A simple restful api server for MphaGo
Citrus also require Node.js. we recommend Node.js Latest
$ npm install
$ npm run stg
$ yarn install
$ yarn stg
If you need to configure Citrus's settings, create citrus.json
in project root directory.
default config file
{
"logger": {
"transports": [
{
"type": "console",
"level": "debug"
},
{
"type": "file",
"filename": "logs/api",
"level": "debug"
},
{
"type": "file",
"filename": "logs/error",
"level": "error"
},
{
"type": "file",
"filename": "logs/warn",
"level": "warn"
}
]
}
}
default value of logger field
{
"transports": [
{
"type": "console",
"level": "debug"
},
{
"type": "file",
"filename": "logs/api",
"level": "debug"
},
{
"type": "file",
"filename": "logs/error",
"level": "error"
},
{
"type": "file",
"filename": "logs/warn",
"level": "warn"
}
]
}
transports
is winston logger based Transport
array. transports
's element look like
interface Transport {
type: 'console' | 'file';
filename?: string;
level: 'error' | 'warn' | 'info' | 'http' | 'verbose' | 'debug' | 'silly'
}
server
field is one
default value of database field
"database": {
"postgres": {
"host": null,
"port": 5432,
"username": null,
"password": null,
"database": null
}
}
postgres
is a configuration of PostgreSQL DB, which is supported by citrus.
all type of database is same type
interface DatabaseConfigure {
host: string;
port: number;
username?: string;
password?: string;
database?: string;
}
- features
- Using koa
- Using typeorm
- OAuth 2.0 (2021)
- misc.
- decide which db used - PostgreSQL
- decide question entity format
심수용 |
---|
2020105627 |
컴퓨터공학과 |
![]() |
Citrus is MIT License