Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var connect = require('connect')
, http = require('http')
, https = require('https');
var app = connect()
.use(connect.logger('dev'))
.use(connect.static('public'))
.use(function(req, res){
res.end('hello world\n');
})
http.createServer(app).listen(80);
https.createServer(tlsOptions, app).listen(443);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment