hapi-routes-prefixer
A simple plugin to prefix routes with strings such as '/v1' or '/api'.
Why?
When we want to apply prefix to individual route plugins but not to all of the plugins registered with the server object.
Installation
npm install --save hapi-routes-prefixer
Usage
After installing register the module as a plugin.
var Hapi = ;var server = ;var prefixer = ; server; server;
After registering the plugin, use it in your routes like this.
exports { var route = server; ; ;}; exportsregisterattributes = name: 'api.user' version: '1.0.0';
The above routes can be accessed at 'domain.com/api/users' now.