UNPKG

miniframe-router

Version:

Simple router for Express.js, making routes and controllers easy to manage.

11 lines (8 loc) 270 B
import express from "express"; import getRouter from "./routes"; // <<< DEFINE ROUTES const app = express(); app.use(express.json()); app.use(getRouter()); // <<< APPLY ROUTES app.listen(3000, () => { console.log("Demo app is running on http://localhost:3000"); });