1.1.6 • Published 4 years ago
succinct-router v1.1.6
succinct-router
Create routes without redundant declarations.
Usage
const express = require("express");
const route = require("succinct-router");
const app = express();
route({
getRoot: (req, res) => {
res.render("index.html");
},
getHello: (req, res) => {
res.send("Hello, world!");
}
});
The routes will be accessible via GET methods to / and /hello respectively.