agate icon indicating copy to clipboard operation
agate copied to clipboard

缓存

Open RubyLouvre opened this issue 9 years ago • 3 comments

https://cnodejs.org/topic/55210d88c4f5240812f55408 https://www.mnot.net/cache_docs/

RubyLouvre avatar Apr 05 '15 16:04 RubyLouvre

image

RubyLouvre avatar Apr 08 '15 06:04 RubyLouvre

image

RubyLouvre avatar Apr 09 '15 07:04 RubyLouvre

为什么使用pm2 ? 最牛的监控平台,集成多线程及热启动技术。

如果你在启动时报以下错误

D:\agate>pm2 start app --node-args="--harmony"
fs.js:751
  return binding.mkdir(pathModule._makeLong(path),
                 ^
Error: ENOENT, no such file or directory 'D:\Users\qincheng.zhong.QUNARSERVERS\.
pm2'

那么你应该建立D:\Users\qincheng.zhong.QUNARSERVERS\.pm2目录就可以了

D:\agate>mkdir D:\Users\qincheng.zhong.QUNARSERVERS\.pm2

D:\agate>dir D:\Users\qincheng.zhong.QUNARSERVERS\.pm2

https://doesnotscale.com/deploying-node-js-with-pm2-and-nginx/ 然后运行pm2 start app --node-args="--harmony"(你不需要再运行node app --harmony) image

当然我们也可以用配置方式json启动pm2

//需要跑到config目录下
$ pm2 start pm2.json
$ pm2 stop pm2.json
$ pm2 delete pm2.json
$ pm2 restart pm2.json

pm2.json在window下不能使用监控功能watch 配置方式不时会出问题,实在不行,还是换回命令行方式

pm2 start app --node-args="--harmony" --name "kkk" --watch

-i 好像不怎么好用

RubyLouvre avatar Apr 22 '15 13:04 RubyLouvre