Delightful modern web applications framework for hapi.js
Features
✓ Built on top of hapi.js, A rich framework for building applications and services
✓ Optionally using Controllers for routing
✓ Single file configuration without need to extra boilerplate
✓ CLI & Dev friendly tools
✓ Stable and rich echo-system of hapi compatible plugins
✓ Modular design without modifying core
Getting started
Install bak
package:
yarn add bak
Create bak.config.js
;
module.exports = {
prefix: '/api',
routes: [
'./controllers/api'
]
}
Create controllers/api.js
:
const { Controller } = require('bak')
module.exports class APIController extends Controller {
hello_$name (request, h) {
return 'Hello ' + request.params.name
}
}
Start server:
yarn bak start
Your API is up! Now you can visit http://localhost:3000/api/hello/world for the results.
License
Copyright (c) 2016-2017 Fandogh - Pooya Parsa
Released under The MIT LICENSE