This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example of PM2 ecosystem file, working with nvm environment | |
| // on a AWS EC2 instance running ubuntu | |
| const HOST = ''; | |
| const REPONAME = ''; | |
| module.exports = { | |
| apps: [ | |
| { | |
| name : 'DEVICES:API', | |
| script : 'server.js', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example of PM2 ecosystem file, working with nvm environment | |
| // on a AWS EC2 instance running ubuntu | |
| const HOST = ''; | |
| const REPONAME = ''; | |
| module.exports = { | |
| apps: [ | |
| { | |
| name : 'DEVICES:API', | |
| script : 'server.js', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| NAME="Myproj" # Name of the application | |
| DJANGODIR=/home/ubuntu/webapps/projects/myproj # Django project directory | |
| DJANGOENVDIR=/home/ubuntu/webapps/projects/myproj_env # Django project env | |
| SOCKFILE=/home/ubuntu/webapps/projects/myproj_env/run/gunicorn.sock # we will communicte using this unix socket | |
| USER=ubuntu # the user to run as | |
| GROUP=ubuntu # the group to run as | |
| NUM_WORKERS=3 # how many worker processes should Gunicorn spawn (2 * CPUs + 1) | |
| DJANGO_SETTINGS_MODULE=Myproj.settings # which settings file should Django use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require("fs") | |
| var ssl_options = { | |
| key: fs.readFileSync('privatekey.pem'), | |
| cert: fs.readFileSync('certificate.pem') | |
| }; | |
| var port = process.env.PORT || 3000; | |
| var express = require('express'); | |
| var ejs = require('ejs'); | |
| var passport = require('passport') |