To use app.configure in with Node.js Express, we call app.use
.
For instance, we write
const express = require("express");
const app = express();
app.use(/*****/);
app.use(/*****/);
app.get("/", (req, res) => {
//...
});
to call app.use
to load middlewares before we call app.get
to add a get route handler.