All Projects → Salesflare → hapi-routes

Salesflare / hapi-routes

Licence: MIT license
Hapi plugin for registering routes

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to hapi-routes

hapi-plugin-mysql
Hapi plugin for MySQL
Stars: ✭ 17 (+41.67%)
Mutual labels:  hapijs, hapi-plugin
hapi-good-winston
A good reporter to send and log events with winston
Stars: ✭ 21 (+75%)
Mutual labels:  hapijs, hapi-plugin
hapi-now-auth
Hapi token auth for bearer and jwt
Stars: ✭ 43 (+258.33%)
Mutual labels:  hapijs, hapi-plugin
Getx
Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
Stars: ✭ 5,578 (+46383.33%)
Mutual labels:  routes
Stplanr
Sustainable transport planning with R
Stars: ✭ 352 (+2833.33%)
Mutual labels:  routes
Universal Router
A simple middleware-style router for isomorphic JavaScript web apps
Stars: ✭ 1,598 (+13216.67%)
Mutual labels:  routes
vue-error-page
[NO LONGER MAINTAINED] Provides a wrapper for router-view that allows you to show error pages without changing the URL.
Stars: ✭ 52 (+333.33%)
Mutual labels:  routes
gatsby-plugin-dynamic-routes
Creating dynamic routes based on your environment and/or renaming existing routes
Stars: ✭ 14 (+16.67%)
Mutual labels:  routes
Php Whois
PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 5.4+ and 7+ compatible
Stars: ✭ 179 (+1391.67%)
Mutual labels:  routes
Routegen
Define your API and SPA routes in one place. Use them anywhere. Only 1.3kb.
Stars: ✭ 86 (+616.67%)
Mutual labels:  routes
Nova Route Viewer
Route viewer tool for Laravel Nova
Stars: ✭ 54 (+350%)
Mutual labels:  routes
Xrouter
Navigate anywhere in just one line.
Stars: ✭ 411 (+3325%)
Mutual labels:  routes
Slim Oauth2
Routes and Middleware for Using OAuth2 Server within a Slim Framework API
Stars: ✭ 121 (+908.33%)
Mutual labels:  routes
Microwebsrv2
The last Micro Web Server for IoTs (MicroPython) or large servers (CPython), that supports WebSockets, routes, template engine and with really optimized architecture (mem allocations, async I/Os). Ready for ESP32, STM32 on Pyboard, Pycom's chipsets (WiPy, LoPy, ...). Robust, efficient and documented!
Stars: ✭ 295 (+2358.33%)
Mutual labels:  routes
Ziggy
Use your Laravel named routes in JavaScript
Stars: ✭ 2,619 (+21725%)
Mutual labels:  routes
routemap
DEPRECATED Returns a list of Craft/Vue/React route rules and entry & asset URLs for ServiceWorkers from Craft entries
Stars: ✭ 27 (+125%)
Mutual labels:  routes
Laravel Router
An organized approach to handling routes in Laravel.
Stars: ✭ 130 (+983.33%)
Mutual labels:  routes
Laravel
Muito conteúdo sobre o framework Laravel. Controllers, Models, Views, Blade, Migrations, Seeders, Middlewares, Autenticação, Autorização, Providers, pacotes, laravel 8, etc.
Stars: ✭ 43 (+258.33%)
Mutual labels:  routes
Rails Routes
Enable config/routes/*.rb on your Rails application.
Stars: ✭ 24 (+100%)
Mutual labels:  routes
Php Wss
Web-socket server/client with multi-process and parse templates support on server and send/receive options on client
Stars: ✭ 117 (+875%)
Mutual labels:  routes

Hapi Routes Build Status

hapi plugin for registering routes

What

Hapi Routes allows you to put all your routing logic in different files in a specified folder. This allows you to have a clear overview of your routes.

How

server.js

const server = new Hapi.server();

await server.register({
  plugin: require('hapi-routes'),
  options: {
    dir: `${__dirname}/test/routes/*`,
  },
});

options take the following arguments:

{
  dir: String,  // (Required): Relative path where to search for route files.
                               Requires a globable path: 'routes/*', 'routes/**/*.js', etc
  test: RegExp, // (Optional): Regular expression for matching files, defaults to /\.(js)$/
}

In the example the routes are located in test/routes relative to the server.js module.

Hapi Routes requires that your route files have a routes method exported:

test/routes/example.js

const routes = [{
  method: 'GET',
  path: '/',
  handler: (request, reply) => reply('Hello world'),
}];

exports.routes = server => server.route(routes);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].