fastify-router
Simple fastify router.
Install
$ npm install fastify-router
Example
const fastify = ;const fastifyRouter = ; fastify; const Router = fastifyRouter; const example = // Router prefix: '/home' routes: // Route / method: 'GET' url: '/' schema: response: 200: type: 'string' reply // Router prefix: '/users' routes: // Route /users/ method: 'GET' url: '/' schema: response: 200: type: 'object' properties: name: type: 'string' reply // Route /users/:id method: 'GET' url: '/:id' schema: response: 200: type: 'object' properties: name: type: 'string' reply routers: // Router prefix: '/register' routes: // Route /users/register method: 'POST' url: '/' schema: response: 200: type: 'object' properties: name: type: 'string' reply ; Router;