后台运行nodejs的办法

使用forever模块

首先安装一下

https://www.npmjs.com/package/forever

npm install forever -g

接着在工程文件夹下运行express的入口程序

E:\newwebnode\newweb>forever start ./bin/www

关闭窗口即可。

 

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com 徽标

You are commenting using your WordPress.com account. Log Out /  更改 )

Google+ photo

You are commenting using your Google+ account. Log Out /  更改 )

Twitter picture

You are commenting using your Twitter account. Log Out /  更改 )

Facebook photo

You are commenting using your Facebook account. Log Out /  更改 )

Connecting to %s