make process.env.port same for front end and back end heroku 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