diff --git a/apps/api/package.json b/apps/api/package.json index 92fb3f794..530412455 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -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", diff --git a/apps/api/src/global/providers/db.provider.ts b/apps/api/src/global/providers/db.provider.ts index 55877ab11..9802f96af 100644 --- a/apps/api/src/global/providers/db.provider.ts +++ b/apps/api/src/global/providers/db.provider.ts @@ -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 = { provide: DB, useFactory: () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 857b534e7..3737872ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,6 +51,9 @@ importers: rxjs: specifier: ^7.8.1 version: 7.8.1 + start: + specifier: ^5.1.0 + version: 5.1.0 devDependencies: '@nestjs/cli': specifier: ^10.0.0 @@ -8886,6 +8889,12 @@ packages: resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} dev: true + /start@5.1.0: + resolution: {integrity: sha512-lirwWQmvBC65bnxU3HzKx5m7vfZJZTx/FrKyPWbtobcvujGbinQQRrNodtcgkp4mTZ00umzDeg7lraN351l0aA==} + engines: {node: '>=4'} + deprecated: Deprecated in favor of https://github.com/deepsweet/start + dev: false + /statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'}