vue js pass heroku port to app code example
Example: vue js access heroku port
// 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