User Tools

Site Tools


njsetn:intro_to_express

express → développement d'applications serveur (web server framework)

var express = require("express");

var app = express();

// app.use(express.static("./public"));
// ou (code à compléter voir page suivante)
app.use(function(req, res, next) {
  console.log(`${req.method} request for '${req.url}'`);
  next();
});

app.listen(3000);

console.log("Express app running on port 3000");

module.exports = app;
njsetn/intro_to_express.txt · Last modified: 2016/03/27 20:15 by leo