1.1.15 • Published 7 years ago

express-easy-router v1.1.15

Weekly downloads
1
License
MIT
Repository
github
Last release
7 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

7 years ago

1.1.14

7 years ago

1.1.13

7 years ago

1.1.12

7 years ago

1.1.11

7 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago