0.0.8 • Published 6 years ago

@jschmold/kor v0.0.8

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

Initial Setup

npm i mocha ts-node typedoc typescript --global

Configuration

File: config.yaml

keydescriptionvaluesrequired?
modeSelect the mode that the application is to run in. Also affects the database suffix names. (dbsource.development.yaml), default is development"production", "development"no
portThe port that the server will run on. Default 8080Any valid port numberno
dataConfigsThe directory of the database configuration yamlsa directory stringno
dataSourcesThe data sources to be loaded into the data connections module. These should align with filenames in the data sources directorystring[]yes
verbosityThe level of logging to permit. Default is warn.debug, log, info, warn, error, noneno
secretThe API secret key to use for the cookie-parser and csrf protection.any stringyes

Modules

Modules are a whole helluva lot like Angular. I built the config this way to enable some sense of familiarity for Angular Developers, and to make it a little easier to manage the whole process of modularizing server applications.

import { ApplicationModule } from '@jschmold/kor';
// import your models here
// import your controllers here

@ApplicationModule(
  models: [
    // models here
  ],
  controllers: [
    // controllers here
  ]
)
export class MyApplicationModule {
  
}