1.1.15 • Published 6 years ago

express-easy-router v1.1.15

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

express-easy-router

More easy and flexible router for node express.

  1. Group express routes and middlewares with mount path,

Made with a lot of love and tissue papers! :)

Find me at:

https://github.com/vtista/easyRoute

Quick Start

  1. npm install express-easy-router
  1. create index.js

    import express from 'express';
    import router from 'express-easy-router';
    
    let app = express(); 
    router.get('/hi',(req,res)=>{
    res.send('hi');
    })
    
    router.group('/user',(req,res,next)=>{
    console.log('this is it!');
    next();
    },()=>{
    router.get('/name',(req,res)=>{
    	res.send('mark');
    });
    router.get('/age',(req,res)=>{
    	res.send('18');
    })
    });
    router.bind(app);
    let server = app.listen(8088, function () {
    
    let host = server.address().address
    let port = server.address().port
    
    console.log(" http://%s:%s", host, port)
    
    })
     
     
  1. node index.js

    You shall see the message now!

Happy coding!

:)

1.1.15

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago