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

Cannot run with forever js #2133

Closed
SuThaw opened this issue Aug 20, 2014 · 14 comments
Closed

Cannot run with forever js #2133

SuThaw opened this issue Aug 20, 2014 · 14 comments

Comments

@SuThaw
Copy link

SuThaw commented Aug 20, 2014

I installed forever js with
"npm install forever -g"
and I run like this
forever start app.js --prod

nothing happen , when i check with forever list there is a process running. But it doesn't work. What is wrong??

@mikermcneil mikermcneil changed the title Cannot run with forever js Cannot run with forever js Aug 20, 2014
@RWOverdijk
Copy link
Contributor

What do you mean with "doesn't work"? Because for me it works just fine.
Please follow these steps:

  1. Set the log level to verbose in config/log.js
  2. Run the application with forever. forever start app.js
  3. Figure out where the log file is. forever list
  4. Tail the log file to figure out what's happening. tail -f /home/my-user/.forever/fz6i.log
  5. If you still can't figure out why it's broken, paste the results (console output) here.

@SuThaw
Copy link
Author

SuThaw commented Aug 20, 2014

screen shot 2014-08-20 at 3 11 09 pm

here is the screen shot

@SuThaw
Copy link
Author

SuThaw commented Aug 20, 2014

The server is not started and when i access to localhost:1337 , it get nothing

@RWOverdijk
Copy link
Contributor

You didn't do everything I asked.

@SuThaw
Copy link
Author

SuThaw commented Aug 20, 2014

screen shot 2014-08-20 at 3 33 08 pm

@SuThaw
Copy link
Author

SuThaw commented Aug 20, 2014

in the log it is just waiting

@RWOverdijk
Copy link
Contributor

It should be waiting.

Are you running it on your local machine? If so, what do you see when you go to http://127.0.0.1:1337 ?

@SuThaw
Copy link
Author

SuThaw commented Aug 20, 2014

This webpage is not available It is also not work on my vps. It is the same.

@RWOverdijk
Copy link
Contributor

I can not reproduce this. does running node app.js work? As in, does it then show in the browser?

@SuThaw
Copy link
Author

SuThaw commented Aug 20, 2014

it is working with node app.js. Just only not work with forever.js. Is there something wrong in when i create the project. I installled the sails globally and start the project with "sails new project-name --linker'

@RWOverdijk
Copy link
Contributor

I can't reproduce this. Another question, follow the steps I mentioned before. In stead of doing tail -f, do a cat, and paste the results, as in all of it, on http://gist.github.com

  1. Stop any processes forever stop app.js
  2. Start a new one forever start app.js
  3. Figure out where the log file is. forever list
  4. Dump the log cat path/to/log/from/step/3
  5. Paste results

@SuThaw
Copy link
Author

SuThaw commented Aug 20, 2014

@RWOverdijk
Copy link
Contributor

@SuThaw

 Excuse my interruption, but it looks like this app
 does not have a project-wide "migrate" setting configured yet.
 (perhaps this is the first time you're lifting it with models?)

 In short, this setting controls whether/how Sails will attempt to automatically
 rebuild the tables/collections/sets/etc. in your database schema.
 You can read more about the "migrate" setting here:
 http://sailsjs.org/#/documentation/concepts/ORM/model-settings.html?q=migrate

 In a production environment (NODE_ENV==="production") Sails always uses
 migrate:"safe" to protect inadvertent deletion of your data.
 However during development, you have a few other options for convenience:

 1. safe  - never auto-migrate my database(s). I will do it myself (by hand)
 2. alter - auto-migrate, but attempt to keep my existing data (experimental)
 3. drop  - wipe/drop ALL my data and rebuild models every time I lift Sails

What would you like Sails to do?

info: To skip this prompt in the future, set `sails.config.models.migrate`.
info: (conventionally, this is done in `config/models.js`)

warn: ** DO NOT CHOOSE "2" or "3" IF YOU ARE WORKING WITH PRODUCTION DATA **

You have migrate set to (I think) nothing. Open up config/models.js and add migrate: 'safe'.

Optionally, you can choose between these migration options:

  • safe - Don't do anything
  • alter - Alter the tables, and try to keep the data in them
  • drop - Drop all tables, and their data, and rebuild them using the new model definitions.

@SuThaw
Copy link
Author

SuThaw commented Aug 20, 2014

@RWOverdijk Thanks a lot. I got it. Thanks for your advice.

@SuThaw SuThaw closed this as completed Aug 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants