UNPKG

@dazejs/framework

Version:

Daze.js - A powerful web framework for Node.js

17 lines (15 loc) 400 B
import { Provide, Disable } from '../../../decorators'; import { Database } from '../../../supports/database/database'; import { Application } from '../../application'; export class DatabaseProvider{ @Provide(Database) @Disable _database(app: Application) { return new Database(app); } @Provide('db') @Disable _databaseAlias(app: Application) { return app.get(Database); } }