Express.js

http://expressjs.com

sudo npm install -g express

sudo npm install -g express-generator express --help

express -e myapp cd myapp ls -al

sudo npm install DEBUG=myapp ./bin/www

Browse http://localhost:3000

Extra : HTTPS
mkdir cert cd cert openssl genrsa 1024 > key.pem openssl req -x509 -new -key key.pem > key-cert.pem

ar express = require('express') , fs = require('fs') , routes = require('./routes');

var privateKey = fs.readFileSync('cert/key.pem').toString; var certificate = fs.readFileSync('cert/key-cert.pem').toString;

// To enable HTTPS var app = module.exports = express.createServer({key: privateKey, cert: certificate}); ..

Ressources

 * Cheatsheet
 * Chapitre 8 du livre "Node.js in Action", Mannings