Skip to content

codeekage/express-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP router like Express Router

Express-Lib is an HTTP router than implements basic HTTP Verb POST, GET, DELETE and PUT

Usage

Initialise

const { Router } = require('./lib');

const router = Router();

rotuer.use((req, res) => req.user = 'userId')

router.post('/path', (req, res) => res.send('Made a Post Request'));
router.get('/path', (req, res) => res.send('Made a GET Request'));
router.put('/path', (req, res) => res.send('Made a PUT Request'));
router.delete('/path', (req, res) => res.send('Made a PUT Request'));

Improvements

  • Introduce next function

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published