Skip to content

Commit

Permalink
feat(pg): disable drizzle to avoid timestamps stringification
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrishajev authored and Redm4x committed Jul 16, 2024
1 parent c786d64 commit 6e59b6b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion apps/api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { Hono } from "hono";
import { cors } from "hono/cors";
import { container } from "tsyringe";

import { HttpLoggerService, LoggerService } from "@src/core";
import { HttpLoggerService } from "@src/core/services/http-logger/http-logger.service";
import { LoggerService } from "@src/core/services/logger/logger.service";
import packageJson from "../package.json";
import { chainDb, syncUserSchema, userDb } from "./db/dbConnection";
import { apiRouter } from "./routers/apiRouter";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Context, Next } from "hono";
import { singleton } from "tsyringe";

import { LoggerService } from "@src/core";
import { LoggerService } from "@src/core/services/logger/logger.service";
import type { HonoInterceptor } from "@src/core/types/hono-interceptor.type";

@singleton()
Expand Down
13 changes: 8 additions & 5 deletions apps/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import "./open-telemetry";
import { container } from "tsyringe";

import { initApp } from "@src/app";
import { PostgresMigratorService } from "@src/core";
import type { PostgresMigratorService } from "@src/core";

container
.resolve(PostgresMigratorService)
.migrate()
.then(() => initApp());
const { BILLING_ENABLED } = process.env;

const migrate =
// eslint-disable-next-line @typescript-eslint/no-var-requires
BILLING_ENABLED === "true" ? container.resolve<PostgresMigratorService>(require("@src/core").PostgresMigratorService).migrate() : Promise.resolve();

migrate.then(() => initApp());
1 change: 1 addition & 0 deletions package-lock.json

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

0 comments on commit 6e59b6b

Please sign in to comment.