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

is it possible to run with forever #153

Closed
hoony-o-1 opened this issue Jun 27, 2015 · 7 comments
Closed

is it possible to run with forever #153

hoony-o-1 opened this issue Jun 27, 2015 · 7 comments

Comments

@hoony-o-1
Copy link

I'd like to run an app with this template on linux server.

can I run with forever or something like forever?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@cmnstmntmn
Copy link

@thechunsik cource you can; just package it and than run

forever start build/server.js

@korczis
Copy link

korczis commented Jul 9, 2015

I am running it (forever) in way mentioned by @cmnstmntmn and it works like a charm!

@ghost
Copy link

ghost commented Jul 9, 2015

PM2 is an alternative to forever.

@dastiw1
Copy link

dastiw1 commented Feb 25, 2016

How can i run server with PM2?
i can try _pm2 start build/server.js _ and pm2 start tools/run.js
But it's not correct way. How to?

@dfrankland
Copy link

For pm2 you will need to create an application declaration at the root of react-starter-kit like this:

{
  "apps": [
    {
      "name": "react-starter-kit",
      "script": "tools/run.js",
      "args": ["start", "--release"],
      "exec_interpreter": "./node_modules/.bin/babel-node",
      "exec_mode": "fork",
    }
  ]
}

@Ilshidur
Copy link

@dfrankland Sorry to post this after one year, but I had to point this out for other people reaching to our answer :

babel-node must not be run in production ! See the doc for more information.

I strongly recommend to build the sources instead and run the main script using the following command :
node build/server.js.

@ulani
Copy link
Member

ulani commented May 27, 2021

@hoonyland thank you very much for crating this issue! Unfortunately, we have close it due to inactivity. Feel free to re-open it or join our Discord channel for discussion.

NOTE: The main branch has been updated with React Starter Kit v2, using JAM-style architecture.

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

7 participants