1.0.4 • Published 7 years ago

hapi-echo-routes v1.0.4

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

hapi-echo-routes Build Status

npm

:loudspeaker: Display all routes inspired by rake routes of Ruby on Rails

Usage

Install dependencies

npm install hapi-echo-routes

# with yarn
yarn add hapi-echo-routes

Register plugin

const Hapi = require('hapi')
const server = Hapi.server({ port: 5555 })

+ const echoRoutes = require('hapi-echo-routes')
+ server.register(echoRoutes)

Then, routes will be available with server.app.routes :

console.log(server.app.routes)

POST	/auth/login
POST	/auth/register
GET   /users
GET   /users/{user_id}
POST  /users/{user_id}

Or if you want to print to the console, just passed { debug: true} options

server.register({
	plugin: echoRoutes,
	options: {
		debug: true
	}
})

That's it \m/\m/

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago