vue js access heroku port

Solutions on MaxInterview for vue js access heroku port by the best coders in the world

showing results for - "vue js access heroku port"
Caelan
11 Aug 2016
1// vue.config.js
2const webpack = require('webpack');
3module.exports = {
4  configureWebpack: {
5    plugins: [
6      new webpack.DefinePlugin({
7        'process.env': {
8          'PORT': JSON.stringify(process.env.PORT)
9        }
10      })
11    ]
12  }
13}
14
15// You can now access process.env.PORT anywhere in your vue application