Skip to content

Commit

Permalink
fix: api start
Browse files Browse the repository at this point in the history
  • Loading branch information
hildxd committed Jan 14, 2024
1 parent 220ac78 commit 7d4b3c1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"@earthwrom/shared": "workspace:*",
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/platform-express": "^10.0.0",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.1",
"@earthwrom/shared": "workspace:*"
"start": "^5.1.0"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
Expand Down
5 changes: 3 additions & 2 deletions apps/api/src/global/providers/db.provider.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { FactoryProvider, Logger } from '@nestjs/common';
import { type MySql2Database } from 'drizzle-orm/mysql2';
import { env } from '@earthwrom/shared';
import { drizzle } from 'drizzle-orm/mysql2';
import mysql from 'mysql2/promise';
import * as mysql from 'mysql2/promise';
import { DefaultLogger, LogWriter } from 'drizzle-orm';

export const DB = Symbol('DB_SERVICE');
export type DbType = MySql2Database;

const env = process.env

export const DbProvider: FactoryProvider<DbType> = {
provide: DB,
useFactory: () => {
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7d4b3c1

Please sign in to comment.