NodeJS Upgrade 5.1.0 and Deployment

本文档详细介绍了Node.js版本5.1.0在不同操作系统上的安装与部署问题及解决方案,并提供了使用Forever进行Node.js应用部署的具体步骤,包括Forever的安装、版本检查、应用程序发布与启动等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值