4.0.14 • Published 5 years ago
the-controller-base v4.0.14
the-controller-base
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
5 years ago
4.0.13
6 years ago
4.0.12
6 years ago
4.0.11
6 years ago
4.0.10
6 years ago
4.0.9
6 years ago
4.0.8
6 years ago
4.0.7
6 years ago
4.0.6
6 years ago
4.0.5
6 years ago
4.0.4
6 years ago
4.0.3
6 years ago
4.0.2
6 years ago
4.0.1
6 years ago
4.0.0
6 years ago
3.1.7
6 years ago
3.1.6
6 years ago
3.1.5
6 years ago
3.1.4
6 years ago
3.1.3
6 years ago
3.1.2
6 years ago
3.1.1
6 years ago
3.1.0
6 years ago
3.0.12
6 years ago
3.0.11
6 years ago
3.0.10
6 years ago
3.0.9
6 years ago
3.0.7
6 years ago
3.0.6
6 years ago
3.0.5
7 years ago
3.0.3
7 years ago
3.0.2
7 years ago
3.0.1
7 years ago
3.0.0
7 years ago
2.1.0
7 years ago
2.0.7
7 years ago
2.0.6
7 years ago
2.0.5
7 years ago
2.0.4
7 years ago
2.0.3
7 years ago
2.0.2
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago