Socket
Socket
Sign inDemoInstall

bak

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bak

Delightful modern web applications framework for hapi.js


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Bak.js

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 {

  // Auto magically creates /api/hello/{name} route
  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

FAQs

Package last updated on 29 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc