4.0.14 • Published 6 years ago

the-controller-base v4.0.14

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

the-controller-base

Build Status npm Version JS Standard

Base of the-controllers

Installation

$ npm install the-controller-base --save

Usage

'use strict'

const { TheCtrl } = require('the-controller-base')
const theServer = require('the-server')

async function tryExample () {
  // Create server instance
  const server = theServer({ /* ... */ })

  class FruitShopCtrl extends TheCtrl {
    async buy (name, amount = 1) {
       // Controller instance will be created per client
      const { client, app } = this
      /* ... */
    }
  }

  server.register(FruitShopCtrl, 'fruitShop')

  server.listen(3000)
}

tryExample().catch((err) => console.error(err))

API Guide

License

This software is released under the MIT License.

Links

4.0.14

6 years ago

4.0.13

7 years ago

4.0.12

7 years ago

4.0.11

7 years ago

4.0.10

7 years ago

4.0.9

7 years ago

4.0.8

7 years ago

4.0.7

7 years ago

4.0.6

7 years ago

4.0.5

7 years ago

4.0.4

7 years ago

4.0.3

7 years ago

4.0.2

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago

3.1.7

7 years ago

3.1.6

7 years ago

3.1.5

7 years ago

3.1.4

7 years ago

3.1.3

7 years ago

3.1.2

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.12

7 years ago

3.0.11

7 years ago

3.0.10

7 years ago

3.0.9

7 years ago

3.0.7

7 years ago

3.0.6

7 years ago

3.0.5

8 years ago

3.0.3

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.1.0

8 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago