deploy vuejs heroku

C++
$ heroku create <YOUR-PROJECT-NAME-HERE>
$ heroku config:set NODE_ENV=production --app <YOUR-PROJECT-NAME-HERE>
$ yarn build # or npm run build
$ git status
$ git add && git commit -m 'Deploy to heroku'
$ git push origin master
$ git push heroku master// vue.config.js
const webpack = require('webpack');
module.exports = {
  configureWebpack: {
    plugins: [
      new webpack.DefinePlugin({
        'process.env': {
          'PORT': JSON.stringify(process.env.PORT)
        }
      })
    ]
  }
}

// You can now access process.env.PORT anywhere in your vue application
Source

Also in C++: