`
sillycat
  • 浏览: 2489264 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

NodeJS Upgrade 5.1.0 and Deployment

 
阅读更多
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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics