4.0.1 • Published 5 years ago

@bakjs/auth v4.0.1

Weekly downloads
39
License
MIT
Repository
github
Last release
5 years ago

✓ 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

Install bak package:

yarn add bak

Create bak.config.js;

export default {
  prefix: '/api',
  routes: [
    './controllers/api'
  ]
}

Create controllers/api.js:

import { Controller } from 'bak'

export default class APIController extends Controller {
  init () {
    this.get('/hello/{name}', this.hello)
  }

  hello (request, reply) {
    return 'Hello ' + request.params.name
  }
}

Start server:

yarn bak dev # Use `yarn bak start` for production mode

Your API is up! Now you can visit http://localhost:3000/api/hello/world for the results.

Inspect mode:

You can pass Node.js supported args after -- arg:

yarn bak dev -- --inspect

Released under The MIT LICENSE

4.0.1

5 years ago

4.0.0

5 years ago

3.8.5

5 years ago

3.8.4

5 years ago

3.8.3

5 years ago

3.8.2

5 years ago

3.8.1

5 years ago

3.8.0

5 years ago

3.7.0

6 years ago

3.6.0

6 years ago

3.5.0

6 years ago

3.4.0

6 years ago

3.3.0

6 years ago

3.2.0

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.2-0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago