var express = require("express"); var app = express(); // Ingress app.enable('trust proxy'); // --- ' + err); next(); } app.use(logError); // --- Logger> app.get("/", (req, res, next) => { res.status(200).send('/api'); next(); }); app.get("/api", (req, res, next) => { res.status(200).send('/api/users'); next(); }); app.get("/api/users", (req, res, next) => { res.json([ {"id": "1", "title": "One"}, {"id": "2", "title": "Two"}, {"id": "3", "title": "Three"}, {"id": "4", "title": "Four"} ]); next(); }); app.listen(3000, () => { console.log("Server running on port 3000"); });