Hi,
Can you please help me in overriding the default port and host while running the server using
Environment variables (process.env.PORT ) and where I suppose to make the changes.
Thanks,
Goutham KD
https://github.com/jaredpalmer/razzle#environment-variables
As mentioned below, add PORT=1313
etc to your .env
file
Can you try checking out the readme before asking your question next time?
Might save you some time next time.
It worked for me. See the original issue: https://github.com/jaredpalmer/razzle/issues/356
// This will extract the env during production execution.. PORT will not be inlined during build
const getEnv = c => process.env[c];
app.listen(getEnv('PORT'));