Skip to content
This repository was archived by the owner on Jan 6, 2021. It is now read-only.

design-thinking-6/citrus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Citrus

A simple restful api server for MphaGo
CodeFactor

Index

Getting Started

Citrus also require Node.js. we recommend Node.js Latest

Install with npm

$ npm install
$ npm run stg

Install with yarn

$ yarn install
$ yarn stg

Configuration

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"
      }
    ]
  }
}

logger

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

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

server field is one

database

default value of database field

"database": {
  "postgres": {
    "host": null,
    "port": 5432,
    "username": null,
    "password": null,
    "database": null
  }
}

postgres

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;
}

Todo

  • features
  • Using koa
  • Using typeorm
  • OAuth 2.0 (2021)
  • misc.
  • decide which db used - PostgreSQL
  • decide question entity format

Contributor

심수용
2020105627
컴퓨터공학과

License

Citrus is MIT License

About

the server running MphaGo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published