1.2.0 • Published 6 months ago

group-route-express v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

group-route-express

ini adalah group route untuk expressJS

#Quick start

npm i group-route-express

#How to use For prefixing all routes with a certain path, you use the group method added to the express router, as the following example:

import {prefixRoute, group} from 'group-route-express'

prefixRoute.use('/post', group((router) => {
    router.get('/', function (req, res) {
        res.send("Hallo World");
    });
}))

#Adding Controllers

import {prefixRoute, group} from 'group-route-express'

prefixRoute.use('/post', group((router) => {
    router.get('/', function (req, res) {
        res.send("Hallo World");
    });
    router.get('v1', yourController)
}))

#Adding middlewares

import {prefixRoute, group} from 'group-route-express'

prefixRoute.use('/post', group((router) => {
    router.get('/v2', [middleware], postController.list);
}))
1.2.0

6 months ago

1.1.9

7 months ago

1.1.8

7 months ago

1.1.7

7 months ago

1.1.6

7 months ago

1.1.5

7 months ago

1.1.4

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago