I am Hack Sparrow
Captain of the Internets.

Express.js HTTPS Server Client Example

In this tutorial I will show you how to set up an HTTPS ExpressJS server and connect to it using a TLS client. I will assume you already know how to set up a basic Express.js app, if not read this tutorial. Create an Express app, and use the following code as the server: [code] var fs = require('fs'); var express = require('express'); var https = require('https'); var key = fs.readFileSync('./k ...

Express.js HTTPS

Setting up a HTTPS Express.js server is pretty easy and straightforward. First you need to make sure you have a signed SSL certificate for your server. In case you don't have one, you can create one for yourself this way: [code] $ openssl genrsa -out hacksparrow-key.pem 1024 $ openssl req -new -key hacksparrow-key.pem -out certrequest.csr $ openssl x509 -req -in certrequest.csr -signkey hacksparrow-key.pem -out hacksparrow-cert.pem [/co ...

Node.js HTTPS – SSL Certificate

Need to use HTTPS for a project? Or just wondering how easy or tough it is to implement HTTPS in Node.js? In this post I'll show you how to set up an HTTPS Node.js server on your local system. First off, we'll need to create a SSL certificate for our server. The recommended way is to get your certificate signed by a Certificate Authority, but for testing purposes we will sign it o ...