I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| <div id="charts"></div> |
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/deploy' | |
| set :application_name, 'NodeJS API' | |
| set :domain, 'your-domain.com' | |
| set :deploy_to, '/home/public/your-domain/api' | |
| set :repository, 'ssh://[email protected]/organization-name/project.git' | |
| set :branch, 'dev' |
| module.exports = { | |
| apps: [ | |
| { | |
| name: 'api.domain.com', | |
| script: 'server.js', | |
| output: './logs/api.console.log', | |
| error: './logs/api.error.log', | |
| log_type: 'json', | |
| log_date_format: 'DD-MM-YYYY', | |
| env: { |
| { | |
| "scripts": { | |
| "start": "node server.js", | |
| "dev": "supervisor --inspect server.js", | |
| "test": "NODE_ENV=test mocha -u tdd --timeout 999999 --colors ./test --exit", | |
| "pm2": "pm2 reload ecosystem.config.js" | |
| } | |
| } |
| //During the test the env variable is set to test | |
| process.env.NODE_ENV = 'test'; | |
| //Require the dev-dependencies | |
| const chai = require('chai'); | |
| const chaiHttp = require('chai-http'); | |
| const serverUrl = 'http://localhost:3000'; | |
| const expect = chai.expect; | |
| chai.use(chaiHttp); |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| #! /bin/sh | |
| for x | |
| do | |
| echo "Converting $x" | |
| tr -d '\015' < "$x" > "tmp.$x" | |
| mv "tmp.$x" "$x" | |
| done |
| var express = require('express'); | |
| var app = express(); | |
| var fs = require('fs'); |
| <?php | |
| // this script will parse data from maxmind cities list | |
| // http://download.maxmind.com/download/worldcities/worldcitiespop.txt.gz | |
| // country list taken from | |
| // https://github.com/raramuridesign/mysql-country-list/blob/master/mysql-country-list.sql | |
| ini_set('default_charset', 'UTF-8'); | |
| $arr[1] = 'AF'; |