Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using forever module for windows in nodejs

I downloaded forever module from the following link

https://github.com/nodejitsu/forever

I extracted the zip file and placed it in my node_modules folder. and from my command prompt went into the node js path and gave

forever filename.js as instructed.But i received the error as below

C:\Users\290495\Desktop\newnode\Manoj\Node\nodejs>forever testing.js
'forever' is not recognized as an internal or external command,
operable program or batch file.

Don't know where i am goin wrong.Anyhelp will be much appreciated

like image 857
Amanda G Avatar asked Jan 10 '13 05:01

Amanda G


People also ask

Why do you use forever with node js?

The purpose of Forever is to keep a child process (such as your node. js web server) running continuously and automatically restart it when it exits unexpectedly.

How do I run node js app forever when console is closed?

js application locally after closing the terminal or Application, to run the nodeJS application permanently. We use NPM modules such as forever or PM2 to ensure that a given script runs continuously. NPM is a Default Package manager for Node.

What is difference between PM2 and forever?

forever and PM2 can be primarily classified as "Node. js Process Manager" tools. forever and PM2 are both open source tools. It seems that PM2 with 30K GitHub stars and 2K forks on GitHub has more adoption than forever with 12.5K GitHub stars and 906 GitHub forks.

Can you use NodeJs on Windows?

Node. js makes it possible for you to run JavaScript programs outside of a web browser or on a server. To run a Node. js application on Windows, follow these three steps.


1 Answers

Forever needs to be installed globally. Install it with the -g flag i.e. npm install forever -g

like image 63
Olu Avatar answered Sep 20 '22 16:09

Olu