Skip to content

teziapp/typeorm-multi-tenant

Repository files navigation

typeorm-multi-tenant ✨

Version License: MIT

typeorm-multi-tenant lib allows you to manage dynamic connection with multi tenant using typeorm, connection pooling is internally handled, you can create connection to specific tenant whenever you want!

Installation

npm install typeorm-multi-tenant

Usage

import { Connection } from "typeorm";
import multiTenetConnectionManager from "typeorm-multi-tenant";

const manager = new multiTenetConnectionManager();

async function main() {
  const connection: Connection = await manager.createConnection("connection_name","schema_name");

  
  // Use the connection here
}

main();

Documentation

checkout Examples

🤝 Contributors

Contributions, issues, and feature requests are welcome! 🙌

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

About

Use TypeORM as a multi-tenant provider for your application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors