Oi,
Você pode me ajudar a substituir a porta e o host padrão ao executar o servidor usando
Variáveis de ambiente (process.env.PORT ) e onde devo fazer as alterações.
Obrigado,
Goutham KD
https://github.com/jaredpalmer/razzle#environment -variables
Como mencionado abaixo, adicione PORT=1313
etc ao seu arquivo .env
Você pode tentar verificar o leia-me antes de fazer sua pergunta da próxima vez?
Pode poupar-lhe algum tempo da próxima vez.
Funcionou para mim. Veja a edição original: 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'));