1.1.1 • Published 8 years ago

hapi-devine-routes v1.1.1

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

hapi-devine-routes

Description

šŸ”§ This Hapi plugin loads all routes in the given directory and registers them on your Hapi server

index.js and files starting with a _ are ignored

Install hapi-devine-mongodb

yarn add hapi-devine-mongodb

Usage

register this module as a plugin in Hapi

server.register({

  register: require(`hapi-devine-routes`),

  options: {
    path: path.join(__dirname, `routes`) // routes directory (required)
    log: true // provide logs (optional, default: true)
  }

}, pluginHandler);

The files in your routesDir should return valid Hapi routes (array of route objects / 1 route object).

License

MIT

1.1.1

8 years ago

1.1.0

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