All Projects → gkovacs → self-signed-https

gkovacs / self-signed-https

Licence: other
Creates a self-signed https server

Programming Languages

livescript
113 projects

self-signed-https

Creates a self-signed https server

Installation

npm install self-signed-https

Usage

A basic HTTPS hello world app written in express (paste into app.js):

var express = require('express')
var selfSignedHttps = require('self-signed-https')

var app = express()
app.get('/', function(req, res) {
    res.send('hello world')
})

selfSignedHttps(app).listen(443, '0.0.0.0')

You will need to run as root as it's listening on port 443 (change to a higher port like 3000 if you want to run without sudo):

sudo node app.js

Then, you can visit https://localhost in your web browser

License

MIT

Credits

Author: Geza Kovacs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].