Getting started

The ORM module of SugoiJS provides all that need for CRUD action.

Overview

The ORM module of SugoiJS provides all you need for defining models with CRUD actions. This done by supplying lifecycle driven mechanism, abstraction and connection handling.

The ORM module designed to give you the flexability of defining your CRUD logic along with encapsulation of complex lifecycle mechanism.

Installation

@sugoi/cli

Check the get started section!

Manually

npm install --save @sugoi/orm

tsconfig.json:

Under your tsconfig - compilerOptions set:

  • "target": "es2015"

  • "emitDecoratorMetadata": true

  • "experimentalDecorators": true

  • "lib": ["es2015","dom"]

Template

You can use the config template that was set for the @sugoi/demo application:

{
  "compilerOptions": {
    "baseUrl": "./src",
    "allowJs": true,
    "target": "es2015",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [
      "es2015",
      "dom"
    ],
    "typeRoots": [
      "./node_modules/@types"
    ],
    "types": [
      "body-parser",
      "express",
      "node"
    ]
  }
}

Last updated