Node.js Start script or run command and handoff to OS (no waiting)

Sometimes you want to run something in the OS from your node code but you do not want to follow it or have a callback posted on your stack. The default for child_process spawning is to hold on to a handle and park a callback on the stack. however there is an option which is…

Node.js and Express with HTTPS

Quoting from the doco + some missing stuff: var express = require('express'); var https = require('https'); var http = require('http'); var app = express(); var fs = require('fs'); var options = { key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') }; http.createServer(app).listen(80); https.createServer(options, app).listen(443); nJoy 😉