NodeJS Upgrade 5.1.0 and Deployment
1 Build Issue
Error Message
npm WARN install Couldn't install optional dependency: Unsupported
- jsdoc node_modules/jsdoc/node_modules/jsdoc
Solution:
It works on MAC, but not on Linux
> uname -a
Linux amzn1.x86_64 #1 SMP Mon Sep 14 23:20:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
It seems not working on ubuntu either.
> uname -a
Linux ubuntu-dev1 3.13.0-68-generic #111-Ubuntu SMP Fri Nov 6 18:17:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Roll back to 4.2.2 version will work on ubuntu and EC2 AMAZON Linux.
5.1.0 works pretty well on Raspberry armv71
> uname -a
Linux raspberrypi2 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux
5.1.0 works pretty well on Raspberry armv61 as well.
> uname -a
Linux raspberrypi1 4.1.7+ #817 PREEMPT Sat Sep 19 15:25:36 BST 2015 armv6l GNU/Linux
2 Deployment with Forever
Install forever JS
> npm install -g forever
Check the version
> forever --version
v0.15.1
Release the binary to local
> gulp dist
Unzip the file
> mkdir projectname-1.0
> tar zxvf projectname-1.0.tar.gz -C ./projectname-1.0
Forever command
> forever start --minUptime 10000 --spinSleepTime 10000 -a -l forever.log -o out.log -e err.log app.js
List the forever applications
> forever list
info: Forever processes running
data: uid command script forever pid id logfile uptime
data: [0] JdYP /home/ec2-user/tool/node-v4.2.2/bin/node app.js 10172 10181 /home/ec2-user/.forever/forever.log 0:0:1:12.456
Stop the application
>forever stop 0
How to pass config parameter to the application
> PORT=8004 forever start --minUptime 10000 --spinSleepTime 10000 -a -l forever.log -o ./logs/out.log -e ./logs/err.log app.js
References:
Foreverjs
http://sillycat.iteye.com/blog/2072390
http://sillycat.iteye.com/blog/2194907
https://github.com/foreverjs/forever
Jenkins
http://sillycat.iteye.com/blog/2188892
http://sillycat.iteye.com/blog/2072384
分享到:
相关推荐
nodejs-heroku-deployment
Finally, you'll set up different Jenkins jobs to integrate with NodeJS and C# projects and Jenkins pipelines to make branching easier. By the end of the book, you'll have implemented continuous ...
cd nodejs-hapi-deployment-samples npm install npm start 部署到App Service之前的注意事项 确保引用PORT变量,以初始化hapi服务器。 详细信息: : 使hapi服务地址未设置为“ localhost”,并设置为“ 0.0....
based on nodejs as server and return a web
DigitalOcean-Nodejs-Deployment--源码.rar
NodeJS-BackAnd NodeJS模块允许使用BackAnd Apis 非常少。 更多即将推出。 指示 npm安装 编辑安全详细信息 在GIT存储库或网站根目录之外的文件系统上的某个位置创建一个“ .js”文件。 该文件的内容应为:exports ...
nodejs 搭建oauth服务器的代码 Install nodejs and npm and then, simply run npm install and npm start. The server should now be running at http://localhost:3000.
Productive and Fun Web Development with NodeJS and Microsoft Developer Tools
nodejs初级教程
这是一个vue+nodejs+express+mybatis够成的一个项目案例
NodeJS
,nodEjs ,nodEjs ,nodEjs ,nodEjs ,nodEjs ,nodEjs ,nodEjs ,nodEjs ,nodEjs
节点js NodeJS示例项目
nodejs安装及环境配置
资源名称:NodeJs技术经典文档资源目录:【】Node.js开发指南_中文正版【】nodejs开发指南pdf及源码及win安装程序【】nodejs手册中文【】NodeJs教程【】umav4simple【】七天学会NodeJS【】七天学会NodeJS【】深入浅...
This book has complete source code with all required features of websites, registration, login, edit, delete and session management working source code with explanation, so that you can build upon it...
Learn With Angular 4, Bootstrap, and NodeJS 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
NodeJS开发指南
liunx nodejs+nginx配置收藏版liunx nodejs+nginx配置收藏版
主要介绍了nodejs简单读写excel内容的方法,简单分析了nodejs常见的读写Excel模块,并结合实例形式分析了nodejs读写Excel具体操作技巧,需要的朋友可以参考下