mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat: Re-compute the given items cost job.
feat: Optimize the architecture.
This commit is contained in:
11
server/src/loaders/mongoose.ts
Normal file
11
server/src/loaders/mongoose.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import mongoose from 'mongoose';
|
||||
import { Db } from 'mongodb';
|
||||
import config from '@/../config/config';
|
||||
|
||||
export default async (): Promise<Db> => {
|
||||
const connection = await mongoose.connect(
|
||||
config.mongoDb.databaseURL,
|
||||
{ useNewUrlParser: true, useCreateIndex: true },
|
||||
);
|
||||
return connection.connection.db;
|
||||
};
|
||||
Reference in New Issue
Block a user