Skip to content

Run parse-server as a service in EC2 AWS linux #2382

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

Closed
zh-wowtv opened this issue Jul 25, 2016 · 6 comments
Closed

Run parse-server as a service in EC2 AWS linux #2382

zh-wowtv opened this issue Jul 25, 2016 · 6 comments

Comments

@zh-wowtv
Copy link

I installed parse-server on my AWS Linux EC2. I can run it through:

npm start

But the problem is it will quit when I close my SSH. Is there any sample on how to run it as a service? Thanks.

@cleever
Copy link

cleever commented Jul 25, 2016

I recommend you to use PM2

@zh-wowtv
Copy link
Author

@cleever Sorry, don't get you. What is PM2?

@LamourBt
Copy link

LamourBt commented Jul 25, 2016

you could use either pm2 or forever, they are daemon script that let you app run on your server forever (even though you are connect)

@cleever
Copy link

cleever commented Jul 25, 2016

@zh-wowtv

http://pm2.keymetrics.io/
https://github.com/Unitech/PM2/

"pm2" is a full feature process manager for node.

"forever" aims to run your application continuously. Is an option, but I do not recommend for production environments.

https://github.com/foreverjs/forever

@zh-wowtv
Copy link
Author

Thanks. I'll go through the document. Thanks. @cleever

@hramos hramos closed this as completed Jul 25, 2016
@zh-wowtv
Copy link
Author

zh-wowtv commented Jul 26, 2016

Package.json:

  "scripts": {
    "server": "VERBOSE=1 nodemon ./server.js --exec babel-node",
  },

My mongodb is started as a service. Everything's fine if I use the following command to start my parse-server:

npm run server

But when I start by pm2. It seems the database is not connected. Because I can't see any data in my dashboard.

pm2 start myapp

I created my pm2 app like this:

pm2 start myapp.sh

Inside myapp.sh:

npm run server

Any idea? Thanks.

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

4 participants