Skip to content

Instantly share code, notes, and snippets.

@nanusdad
Last active November 30, 2015 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanusdad/873638dc53785f7a1f11 to your computer and use it in GitHub Desktop.
Save nanusdad/873638dc53785f7a1f11 to your computer and use it in GitHub Desktop.
Starting https service with Node / Express module
var fs = require('fs');
var express = require('express');
var securityOptions = {
key: fs.readFileSync('/certs/domain.com.key'),
cert: fs.readFileSync('/certs/domain.com.chained.crt'),
requestCert: true
};
// .......................................................
// create the secure server (HTTPS)
var app = express();
var secureServer = require('https').createServer(securityOptions, app);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment