
pm2
文章平均质量分 82
zmrdlb
这个作者很懒,什么都没留下…
展开
-
PM2 - Documentation - (Install as .deb & Download as ZIP & Contributing - 贡献)
Install as .deb如果你想安装一个没有设置node的pm2,pm2可作为.deb包来使用。它是为Ubuntu最新的长期支持发布而开发的。安装# 1. Add the PM2 repository signing keysudo apt-key adv --keyserver keyserver.ubuntu.com --recv D1EA2D4C# 2. Add the PM2 r原创 2017-08-10 17:51:31 · 539 阅读 · 0 评论 -
PM2 - Documentation - (PM2 API & Using PM2 in Cloud Providers & Expose static files)
PM2-API暂时用不着,先不翻译Using PM2 in Cloud Providers - 云服务商使用pm2你可以会遇到自己没有权限去访问CLI启动你的node app。你有2个方法规避:使用preinstall指令将pm2安装到全局,并且在start script中启动app;将pm2作为依赖引用,并且在start script中调用模块;方法1:preinstall将pm2到全局in原创 2017-08-10 17:40:30 · 583 阅读 · 0 评论 -
PM2 - Documentation - (Specifics,ES6/AuthBind...)
Specifics,ES6/AuthBind…Listening on port 80 w/o root通常不将node作为root运行,然后只有root才可以绑定小于1024的端口。这是 authbind 所发挥作用的地方。Authbind允许非root用户绑定小于1024的端口。$ sudo apt-get install authbind$ sudo touch /etc/authbind/原创 2017-08-10 17:03:59 · 434 阅读 · 0 评论 -
PM2 - Documentation - (Watch & Restart & Monitoring & Source map)
Watch & RestartAuto restart apps on file change当文件被修改时,pm2默认可以自动restart app$ pm2 start app.js --watch如果 –watch 启用了,那么stop将不会停止监听:pm2 stop 0 不会停止监听pm2 stop –watch 0 将停止监听 注意:watch将不会触发任何 graceful ac原创 2017-08-10 15:50:07 · 1524 阅读 · 0 评论 -
PM2 - Documentation - (Startup Script & Docker Integration & Process Metrics & Process Actions)
Startup Script原创 2017-08-09 18:40:37 · 522 阅读 · 0 评论 -
PM2 - Documentation - (Update PM2 & Deployment)
Update PM2首先保存所有进程$ pm2 save然后按照pm2的最新版$ npm install pm2 -g最后更新内存中的pm2$ pm2 updateDeployment - 部署Getting startedpm2嵌入一个简单而强大的追踪部署系统。一步一步教程 请阅读考虑使用pm2部署1) 生成一个简单的ecosystem.json文件,列出进程和部署环境的配置。原创 2017-08-08 18:05:24 · 822 阅读 · 0 评论 -
pm2 - Documentation - (Cluster Mode&Process File)
Cluster Mode集群模式。集群模式允许网络化的node应用 (http(s)/tcp/udp server) 将可使用的CPU按比例分配,无需修改任何代码。这将极大地提高应用程序的性能和可靠性,这取决于可用CPU的数量。Usage启用集群模式,可以通过加-i配置项$ pm2 start app.js -i 0或者一个 js/yaml/json 文件原创 2017-08-07 14:23:26 · 736 阅读 · 0 评论 -
PM2 - Quick Start
前言PM2是一个针对node应用的进程管理器。保持应用永远处于活动状态,无停机重新加载,以及常见的系统管理任务。github官方地址支持系统:Linux, MacOSx, Windows安装npm install pm2 -g启动应用程序切换到应用程序的工程目录pm2 start app.js常用命令# General$ npm ins原创 2017-08-03 16:20:19 · 671 阅读 · 0 评论 -
PM2 - Documentation - (Graceful restart/reload & Environment management & Log Management)
Graceful restart/reloadGraceful Stop为了优雅的restart/reload/stop,在你的app退出之前,确保你可以收到SIGINT信号,并清除需要删除的数据(例如,数据库连接,进程事务…)process.on('SIGINT', function() { db.stop(function(err) { process.exit(err ? 1原创 2017-08-08 14:39:40 · 1929 阅读 · 0 评论