mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: remove Webpack and depend on nodemon. feat: refactoring expenses. feat: optimize system users with caching. feat: architecture tenant optimize.
12 lines
308 B
TypeScript
12 lines
308 B
TypeScript
import mongoose from 'mongoose';
|
|
import { Db } from 'mongodb';
|
|
import config from 'config';
|
|
|
|
export default async (): Promise<Db> => {
|
|
const connection = await mongoose.connect(
|
|
config.mongoDb.databaseURL,
|
|
{ useNewUrlParser: true, useCreateIndex: true },
|
|
);
|
|
return connection.connection.db;
|
|
};
|