Run the command in your Terminal npm run ssl to generate SSL certificates.
The certificates shall be placed in /Node-API/app/config/ssl/.
Install Let's Encrypt via the apt package manager by issuing the command: apt-get install letsencrypt.
Then, make the command to generate the certificates : letsencrypt-auto certonly --manual --email [email protected] -d example.com
Assign certificates are declared in fileserver.js like this :
var https = require('https');
var fs = require('fs');
var options = {
key: fs.readFileSync('/etc/letsencrypt/live/example.com/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/example.com/cert.pem'),
ca: fs.readFileSync('/etc/letsencrypt/live/example.com/chain.pem')
};
You can consult the Sequelize CLI documentation : http://docs.sequelizejs.com/manual/tutorial/migrations.html#the-cli
Repository : https://github.com/sequelize/cli
First install Docker.
docker build -t <your_image_name> .,docker run -p 8080:8080 -p 4433:4433 -d <your_image_name>.A new image is created on the Docker Hub with each new commit:
docker pull perriea/node-api,docker run -p 8080:8080 -p 4433:4433 -d perriea/node-api.Launch the application with the command : nodemon server.js
The server will restart each time the code is changed.
Launch the application with the command: npm start or node server.js
Install forever or pm2 to start the server in background.
Launch the application with the command: pm2 start cluster.js
One thread per core will be created, example: 4 cores = 4 threads.
This project was realized with the following tools :
Everything is already in place there is no more than to use :)
The MIT License (MIT)
Copyright (c) 2016-2017 Aurelien PERRIER
Content type
Image
Digest
Size
57.4 MB
Last updated
almost 9 years ago
docker pull perriea/node-api