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

How to run it in production mode on AWS #83

Open
ghost opened this issue Jan 2, 2016 · 3 comments
Open

How to run it in production mode on AWS #83

ghost opened this issue Jan 2, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 2, 2016

I've successfully got it running on an AWS machine, with vips and everything.

I did a npm i -g image-resizer

followed by a, mkdir resizer and image-resizer new into that directory.
Changing the variables in the .env file and then running gulp watch is working perfect.

But I wish to keep it running on production mode with pm2, but for some reason, when I set my machine's environment variable to NODE_ENV=production and then run node index.js from within that directory, there is no response. It just stays there and I'm getting no response on the expected PORT.

@conalllaverty
Copy link

It should appear on port 3001 by default. So try hitting http://<PUBLIC_SERVER_IP>:3001

To change variables try
export VAR_NAME=VALUE

@ghost
Copy link
Author

ghost commented Feb 2, 2016

Yea, thanks.

Got it working.
Apparently my environment file wasn't being accepted. I then injected env variables from that env() function call directly. Worked perfectly then.

Thanks for a wonderful implementation.

EDIT: You can close this ticket now.

@kvieira90
Copy link

Instead of injecting the env(), you can change the 'watch' to 'default', so you can do "pm2 start -n image_server gulp" and it'll fetch the .env file and scaffold out the server for you

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

2 participants