@franziz/database-service
v2.1.1
Published
A wrapper for MongoDB database service.
Downloads
1
Readme
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();