Logo
Explore Help
Sign In
gaspersic/freeCodeCamp
1
0
Fork 0
You've already forked freeCodeCamp
Code Issues Pull Requests Projects Releases Wiki Activity
freeCodeCamp/pm2Start.js

15 lines
401 B
JavaScript
Raw Normal View History

updates helmet policies, makes new startup script
2015-06-18 17:08:21 -04:00
var pm2 = require('pm2');
pm2.connect(function() {
pm2.start({
add environmental vars to pm2start instead of hardcoding
2015-08-13 15:40:54 -07:00
name: process.env.SERVER_NAME || 'server',
make production future ready This commit does the following: Production start should use the following command `npm run start-producion` this first runs bower install and builds the front end app(react). Then it will use the `pm2Start` script. This script will set up the pm2 daemons to run loopback in cluster mode. This script also use `production-start` script instead of the regular `server` script. The reasons are two fold: to ensure `server` is run in es7 mode, and to wait for handshake from DB or kill itself if no DB can be found within a certain amount of time.
2015-07-24 22:22:40 -07:00
script: 'server/production-start.js',
quick lint
2015-06-29 10:10:22 -07:00
'exec_mode': 'cluster',
add environmental vars to pm2start instead of hardcoding
2015-08-13 15:40:54 -07:00
instances: process.env.INSTANCES || 1,
'max_memory_restart':
(process.env.MAX_MEMORY / process.env.INSTANCES || 1) || '300M',
'NODE_ENV': 'production'
quick lint
2015-06-29 10:10:22 -07:00
}, function() {
updates helmet policies, makes new startup script
2015-06-18 17:08:21 -04:00
pm2.disconnect();
});
});
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 123ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API