-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathconfig.sample.js
More file actions
42 lines (38 loc) · 700 Bytes
/
config.sample.js
File metadata and controls
42 lines (38 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* sample config file
* write your own custom db wrapper or extensions
* use cp config.sample.js config.js to create one
*/
/**
* db class
* similar to mongodb
*/
/*
export class Db {
constructor (conf) {
console.log(conf.tableName)
}
async findOne () {}
async insert () {}
async update () {}
async remove () {}
async find () {}
}
*/
/**
* extensions
*/
/*
export const extensions = [
{
appExtend: (app, jwtMiddleWare, jwtErrorHandler) => {
app.get('/hello', (req, res) => {
res.send('hello world')
})
app.get('/api/api-need-login', jwtMiddleWare, jwtErrorHandle, (req, res) => {
res.send('hello api')
})
}
}
]
*/