SlideShare a Scribd company logo
1 of 2
Five DifferentApprun on differentportnumber.
path like : /var/www/NTR/NodeApp1
/var/www/NTR/NodeApp2
/var/www/NTR/NodeApp3 ......etc
Step 1 : For Install Forever(Globally)
> npminstall forever-g
step 2 : Do followforeveryNodeApp:
For 1st app : cd /var/www/NTR/NodeApp1/ //Take Pathof NodeApp.
npm install
foreverstart --spinSleepTime10000 app1.js
For 2st app : cd /var/www/NTR/NodeApp2/
npm install
foreverstart --spinSleepTime10000 app2.js .........etc
step 3 : nano~/starter.sh // and copy the following:
#!/bin/sh
if [ $(ps -e -ouid,cmd| grep$UID | grepnode | grep -vgrep| wc -l | tr -s "n") -eq0 ]
then
exportPATH=/usr/local/bin:$PATH
foreverstart--spinSleepTime 10000 --sourceDir/var/www/NTR/NodeApp1/app1.js>>
/var/www/NTR/NodeApp1/log.txt2>&1
foreverstart--spinSleepTime 10000 --sourceDir/var/www/NTR/NodeApp2/app2.js>>
/var/www/NTR/NodeApp2/log.txt2>&1
//..........sameforall app....doit.
fi
step 4 : Thenuse
> crontab-e // and add the followingatlastof file:
@reboot/path/to/starter.sh
For check :
> foreverlist // Shouldsee all runningprocess
For restart :
> sudoreboot

More Related Content

What's hot

Document install arubaito
Document install arubaitoDocument install arubaito
Document install arubaitoTuấn Trần
 
How to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMOHow to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMONaoto MATSUMOTO
 
Job Automation using Linux
Job Automation using LinuxJob Automation using Linux
Job Automation using LinuxJishnu Pradeep
 
Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Tio Aldiansyah
 
Install Quagga - CheatSheet -
Install Quagga - CheatSheet -Install Quagga - CheatSheet -
Install Quagga - CheatSheet -Naoto MATSUMOTO
 
自分だけのデバイスを作るお話
自分だけのデバイスを作るお話自分だけのデバイスを作るお話
自分だけのデバイスを作るお話kishima7
 
RVM - NHRuby Nov 2009
RVM - NHRuby Nov 2009RVM - NHRuby Nov 2009
RVM - NHRuby Nov 2009bturnbull
 
Introduction to Vim
Introduction to VimIntroduction to Vim
Introduction to VimBrandon Liu
 
Link it smart 7688 MEETUP - Bangkok
Link it smart 7688 MEETUP - BangkokLink it smart 7688 MEETUP - Bangkok
Link it smart 7688 MEETUP - BangkokNat Weerawan
 
A3 sec -_msr_2.0
A3 sec -_msr_2.0A3 sec -_msr_2.0
A3 sec -_msr_2.0a3sec
 
Great Hiroshima with Python 170830
Great Hiroshima with Python 170830Great Hiroshima with Python 170830
Great Hiroshima with Python 170830Takuya Nishimoto
 
1. openvpn simple
1. openvpn simple1. openvpn simple
1. openvpn simplekhanh02l1
 
A little systemtap
A little systemtapA little systemtap
A little systemtapyang bingwu
 
Instal vnc in cent os
Instal vnc in cent osInstal vnc in cent os
Instal vnc in cent osManusia Tenan
 
Django district pip, virtualenv, virtualenv wrapper & more
Django district  pip, virtualenv, virtualenv wrapper & moreDjango district  pip, virtualenv, virtualenv wrapper & more
Django district pip, virtualenv, virtualenv wrapper & moreJacqueline Kazil
 
Snort Home Lab - Workshop
Snort Home Lab - Workshop Snort Home Lab - Workshop
Snort Home Lab - Workshop Hishan Shouketh
 

What's hot (20)

Document install arubaito
Document install arubaitoDocument install arubaito
Document install arubaito
 
How to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMOHow to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMO
 
Job Automation using Linux
Job Automation using LinuxJob Automation using Linux
Job Automation using Linux
 
Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Proxy server ubuntu 12.04
Proxy server ubuntu 12.04
 
Install Quagga - CheatSheet -
Install Quagga - CheatSheet -Install Quagga - CheatSheet -
Install Quagga - CheatSheet -
 
自分だけのデバイスを作るお話
自分だけのデバイスを作るお話自分だけのデバイスを作るお話
自分だけのデバイスを作るお話
 
Cron
CronCron
Cron
 
RVM - NHRuby Nov 2009
RVM - NHRuby Nov 2009RVM - NHRuby Nov 2009
RVM - NHRuby Nov 2009
 
Introduction to Vim
Introduction to VimIntroduction to Vim
Introduction to Vim
 
Link it smart 7688 MEETUP - Bangkok
Link it smart 7688 MEETUP - BangkokLink it smart 7688 MEETUP - Bangkok
Link it smart 7688 MEETUP - Bangkok
 
Curses
CursesCurses
Curses
 
Cgroups in android
Cgroups in androidCgroups in android
Cgroups in android
 
A3 sec -_msr_2.0
A3 sec -_msr_2.0A3 sec -_msr_2.0
A3 sec -_msr_2.0
 
Great Hiroshima with Python 170830
Great Hiroshima with Python 170830Great Hiroshima with Python 170830
Great Hiroshima with Python 170830
 
1. openvpn simple
1. openvpn simple1. openvpn simple
1. openvpn simple
 
A little systemtap
A little systemtapA little systemtap
A little systemtap
 
Instal vnc in cent os
Instal vnc in cent osInstal vnc in cent os
Instal vnc in cent os
 
Django district pip, virtualenv, virtualenv wrapper & more
Django district  pip, virtualenv, virtualenv wrapper & moreDjango district  pip, virtualenv, virtualenv wrapper & more
Django district pip, virtualenv, virtualenv wrapper & more
 
Snort Home Lab - Workshop
Snort Home Lab - Workshop Snort Home Lab - Workshop
Snort Home Lab - Workshop
 
How about Gradle?
How about Gradle?How about Gradle?
How about Gradle?
 

Viewers also liked

Viewers also liked (13)

Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Examen 1
Examen 1Examen 1
Examen 1
 
Doc1
Doc1Doc1
Doc1
 
Ingles tednico
Ingles tednicoIngles tednico
Ingles tednico
 
Call setup
Call setupCall setup
Call setup
 
Etna elizabeth
Etna elizabethEtna elizabeth
Etna elizabeth
 
株式会社寄り道
株式会社寄り道株式会社寄り道
株式会社寄り道
 
2015brochureOlder
2015brochureOlder2015brochureOlder
2015brochureOlder
 
วันภาษาไทยแห่งชาติ
วันภาษาไทยแห่งชาติ วันภาษาไทยแห่งชาติ
วันภาษาไทยแห่งชาติ
 
CompTIA Storage+ Powered by SNIA certificate (1)
CompTIA Storage+ Powered by SNIA certificate (1)CompTIA Storage+ Powered by SNIA certificate (1)
CompTIA Storage+ Powered by SNIA certificate (1)
 
IV всероссийская школьная неделя высоких технологий и технопредпринимательства
IV всероссийская школьная неделя высоких технологий и технопредпринимательстваIV всероссийская школьная неделя высоких технологий и технопредпринимательства
IV всероссийская школьная неделя высоких технологий и технопредпринимательства
 
Film analysis - Seven
Film analysis -  SevenFilm analysis -  Seven
Film analysis - Seven
 
Calendário
CalendárioCalendário
Calendário
 

Similar to Node App Start Forever

A journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service managementA journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service managementLubomir Rintel
 
Node.js basics
Node.js basicsNode.js basics
Node.js basicsBen Lin
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoringTiago Simões
 
Home sensor prototype on Arduino & Raspberry Pi with Node.JS
Home sensor prototype on Arduino & Raspberry Pi with Node.JSHome sensor prototype on Arduino & Raspberry Pi with Node.JS
Home sensor prototype on Arduino & Raspberry Pi with Node.JSHyunghun Cho
 
Installation of lammps-5Nov14 on Mac OS X Yosemite
Installation of lammps-5Nov14 on Mac OS X YosemiteInstallation of lammps-5Nov14 on Mac OS X Yosemite
Installation of lammps-5Nov14 on Mac OS X Yosemitefirst name chibaf
 
AMS Node Meetup December presentation Phusion Passenger
AMS Node Meetup December presentation Phusion PassengerAMS Node Meetup December presentation Phusion Passenger
AMS Node Meetup December presentation Phusion Passengericemobile
 
How to burn your GPU with CUDA9.1
How to burn your GPU with CUDA9.1How to burn your GPU with CUDA9.1
How to burn your GPU with CUDA9.1Naoto MATSUMOTO
 
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...Dexter Horthy
 
Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11Yury Pliashkou
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With YouDalibor Gogic
 
Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL John Anderson
 
macos installation automation
macos installation automationmacos installation automation
macos installation automationJon Fuller
 
Workshop: snap from zero to hero
Workshop: snap from zero to heroWorkshop: snap from zero to hero
Workshop: snap from zero to heroMarco Trevisan
 
Webinar: Node.js Transaction Tracing & Root Cause Analysis with StrongLoop Arc
Webinar: Node.js Transaction Tracing & Root Cause Analysis with StrongLoop ArcWebinar: Node.js Transaction Tracing & Root Cause Analysis with StrongLoop Arc
Webinar: Node.js Transaction Tracing & Root Cause Analysis with StrongLoop Arcjguerrero999
 

Similar to Node App Start Forever (20)

A journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service managementA journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service management
 
Node.js basics
Node.js basicsNode.js basics
Node.js basics
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoring
 
Home sensor prototype on Arduino & Raspberry Pi with Node.JS
Home sensor prototype on Arduino & Raspberry Pi with Node.JSHome sensor prototype on Arduino & Raspberry Pi with Node.JS
Home sensor prototype on Arduino & Raspberry Pi with Node.JS
 
Nodejs in Production
Nodejs in ProductionNodejs in Production
Nodejs in Production
 
Installation of lammps-5Nov14 on Mac OS X Yosemite
Installation of lammps-5Nov14 on Mac OS X YosemiteInstallation of lammps-5Nov14 on Mac OS X Yosemite
Installation of lammps-5Nov14 on Mac OS X Yosemite
 
Perl dancer
Perl dancerPerl dancer
Perl dancer
 
AMS Node Meetup December presentation Phusion Passenger
AMS Node Meetup December presentation Phusion PassengerAMS Node Meetup December presentation Phusion Passenger
AMS Node Meetup December presentation Phusion Passenger
 
How to burn your GPU with CUDA9.1
How to burn your GPU with CUDA9.1How to burn your GPU with CUDA9.1
How to burn your GPU with CUDA9.1
 
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
 
Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With You
 
Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL
 
Modern Perl Toolchain
Modern Perl ToolchainModern Perl Toolchain
Modern Perl Toolchain
 
macos installation automation
macos installation automationmacos installation automation
macos installation automation
 
Workshop: snap from zero to hero
Workshop: snap from zero to heroWorkshop: snap from zero to hero
Workshop: snap from zero to hero
 
Docker Intro
Docker IntroDocker Intro
Docker Intro
 
Node.js with Express
Node.js with ExpressNode.js with Express
Node.js with Express
 
FreeBSD: Dev to Prod
FreeBSD: Dev to ProdFreeBSD: Dev to Prod
FreeBSD: Dev to Prod
 
Webinar: Node.js Transaction Tracing & Root Cause Analysis with StrongLoop Arc
Webinar: Node.js Transaction Tracing & Root Cause Analysis with StrongLoop ArcWebinar: Node.js Transaction Tracing & Root Cause Analysis with StrongLoop Arc
Webinar: Node.js Transaction Tracing & Root Cause Analysis with StrongLoop Arc
 

Recently uploaded

DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdfAkritiPradhan2
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming languageSmritiSharma901052
 
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdfPaper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdfNainaShrivastava14
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfisabel213075
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Sumanth A
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSneha Padhiar
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosVictor Morales
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdfsahilsajad201
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodManicka Mamallan Andavar
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书rnrncn29
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTSneha Padhiar
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESkarthi keyan
 

Recently uploaded (20)

DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming language
 
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdfPaper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdf
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdf
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument method
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
 

Node App Start Forever

  • 1. Five DifferentApprun on differentportnumber. path like : /var/www/NTR/NodeApp1 /var/www/NTR/NodeApp2 /var/www/NTR/NodeApp3 ......etc Step 1 : For Install Forever(Globally) > npminstall forever-g step 2 : Do followforeveryNodeApp: For 1st app : cd /var/www/NTR/NodeApp1/ //Take Pathof NodeApp. npm install foreverstart --spinSleepTime10000 app1.js For 2st app : cd /var/www/NTR/NodeApp2/ npm install foreverstart --spinSleepTime10000 app2.js .........etc step 3 : nano~/starter.sh // and copy the following: #!/bin/sh if [ $(ps -e -ouid,cmd| grep$UID | grepnode | grep -vgrep| wc -l | tr -s "n") -eq0 ] then exportPATH=/usr/local/bin:$PATH foreverstart--spinSleepTime 10000 --sourceDir/var/www/NTR/NodeApp1/app1.js>> /var/www/NTR/NodeApp1/log.txt2>&1 foreverstart--spinSleepTime 10000 --sourceDir/var/www/NTR/NodeApp2/app2.js>> /var/www/NTR/NodeApp2/log.txt2>&1 //..........sameforall app....doit. fi step 4 : Thenuse > crontab-e // and add the followingatlastof file: @reboot/path/to/starter.sh
  • 2. For check : > foreverlist // Shouldsee all runningprocess For restart : > sudoreboot