Server online · port 5050

Your Express app is up and running.

This is the default landing page rendered by the auto-generated routes/index.js. Replace it with your own route handler whenever you're ready.

// routes/index.js
var express = require('express');
var router = express.Router();

router.get('/', function(req, res) {
  res.render('index', { title: 'Express' });
});

module.exports = router;

Add routes

Create a new file in routes/ and mount it from app.js.

Middleware

Drop in cors, helmet, morgan — npm has it all.

Views

Pick a template engine in app.set('view engine', …).

Static files

Drop assets into public/. They will be served at the root.