Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSR - running server at User defined port and host. #352

Closed
GouthamKD opened this issue Sep 15, 2017 · 3 comments
Closed

SSR - running server at User defined port and host. #352

GouthamKD opened this issue Sep 15, 2017 · 3 comments

Comments

@GouthamKD
Copy link

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

@jariz
Copy link
Collaborator

jariz commented Sep 18, 2017

https://github.com/jaredpalmer/razzle#environment-variables

As mentioned below, add PORT=1313 etc to your .env file

@jariz jariz closed this as completed Sep 18, 2017
@jariz
Copy link
Collaborator

jariz commented Sep 18, 2017

Can you try checking out the readme before asking your question next time?
Might save you some time next time.

@allanesquina
Copy link

It worked for me. See the original issue: #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'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants