kimsengduong / nestjs-multi-tenancy-typeorm

Nestjs Restfull API for Multi Tenancy with Typeorm Postgres Multi Schema (Tenant per Schema)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications with multi tenancy module and Schema Typeorm.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository. (Still in development)

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Information

This is Nestjs Restfull API with Multi tenancy, inspired from https://tech.canyonlegal.com/multitenancy-with-nestjs-typeorm-postgres.

With multi tenancy schema postgres typeorm.

For initial please hit api to create superadmin account with username: superadmin and password: password.

http://localhost:3000/user/initialize

If you adding new tables and columns in tenancy entity please hit with NODE_ENV=development to synchronize database.

http://localhost:3000/sync_db

Please fork if you want modify this repo.

Please support me here.

ko-fi

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

About

Nestjs Restfull API for Multi Tenancy with Typeorm Postgres Multi Schema (Tenant per Schema)

License:MIT License


Languages

Language:TypeScript 97.2%Language:JavaScript 2.4%Language:Shell 0.4%