NodeJS Upgrade 5.1.0 and Deployment

NodeJSUpgrade5.1.0andDeployment

1BuildIssue

ErrorMessage

npmWARNinstallCouldn'tinstalloptionaldependency:Unsupported

-jsdocnode_modules/jsdoc/node_modules/jsdoc

Solution:

ItworksonMAC,butnotonLinux

>uname-a

Linuxamzn1.x86_64#1SMPMonSep1423:20:33UTC2015x86_64x86_64x86_64GNU/Linux

Itseemsnotworkingonubuntueither.

>uname-a

Linuxubuntu-dev13.13.0-68-generic#111-UbuntuSMPFriNov618:17:06UTC2015x86_64x86_64x86_64GNU/Linux

Rollbackto4.2.2versionwillworkonubuntuandEC2AMAZONLinux.

5.1.0worksprettywellonRaspberryarmv71

>uname-a

Linuxraspberrypi24.1.7-v7+#817SMPPREEMPTSatSep1915:32:00BST2015armv7lGNU/Linux

5.1.0worksprettywellonRaspberryarmv61aswell.

>uname-a

Linuxraspberrypi14.1.7+#817PREEMPTSatSep1915:25:36BST2015armv6lGNU/Linux

2DeploymentwithForever

InstallforeverJS

>npminstall-gforever

Checktheversion

>forever--version

v0.15.1

Releasethebinarytolocal

>gulpdist

Unzipthefile

>mkdirprojectname-1.0

>tarzxvfprojectname-1.0.tar.gz-C./projectname-1.0

Forevercommand

>foreverstart--minUptime10000--spinSleepTime10000-a-lforever.log-oout.log-eerr.logapp.js

Listtheforeverapplications

>foreverlist

info:Foreverprocessesrunning

data:uidcommandscriptforeverpididlogfileuptime

data:[0]JdYP/home/ec2-user/tool/node-v4.2.2/bin/nodeapp.js1017210181/home/ec2-user/.forever/forever.log0:0:1:12.456

Stoptheapplication

>foreverstop0

Howtopassconfigparametertotheapplication

>PORT=8004foreverstart--minUptime10000--spinSleepTime10000-a-lforever.log-o./logs/out.log-e./logs/err.logapp.js

References:

Foreverjs

https://github.com/foreverjs/forever

Jenkins

相关推荐