Express route config
A simple route configuration for Express apps powered by Typescript typing.
About
The motivation is to provide a simple util for role based authentication. It's a common scenario in web apps that some routes are public, allowed only for authentication users or only for admins.
Getting Started
npm install express-route-config
yarn add express-route-config
Example
;; ;; ; loadRoutes; app.use'/', router; // in types/index.ts// extend the Request object to include a `user` property.declare global // or if you install @types/passportdeclare global
Docs
License
MIT