@franziz/database-service
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

Database Service

MongoDB Database Wrapper. This is not ORM. This is just to warp on how we can connect to the database. We changed on how the database is being connected. We don't use static anymore. We use class instead.

How to Use

You need to initialise first

import DatabaseService from "@franziz/database-service";

const databaseService = new DatabaseService({
  connectionString: process.env.DATABASE_URL,
  databaseName: process.env.DATABASE_NAME
});

const db = await databaseService.getInstance();

Readme

Keywords

none

Package Sidebar

Install

npm i @franziz/database-service

Weekly Downloads

7

Version

2.1.1

License

MIT

Unpacked Size

18.4 kB

Total Files

14

Last publish

Collaborators

  • franziz