File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ API_RATE_LIMIT_REFILL_RATE=100
51
51
# https://vitest.dev/config/#watch
52
52
CI = true
53
53
# https://blog.platformatic.dev/handling-environment-variables-in-nodejs#heading-set-nodeenvproduction-for-all-environments
54
- NODE_ENV = test
54
+ NODE_ENV = production
55
55
BETTER_AUTH_SECRET = jvc2rzepazKXR1Glj72lfiW9iOkjZnve
56
56
API_CORS_ORIGIN = http://localhost:4321
57
57
# ######### docker compose `api` container service ##########
Original file line number Diff line number Diff line change 1
- import dotenv from "dotenv" ;
2
1
import { drizzle } from "drizzle-orm/postgres-js" ;
3
2
import envSchema from "env-schema" ;
4
3
import postgres from "postgres" ;
@@ -7,15 +6,14 @@ import {
7
6
envConfigSchema ,
8
7
envSchemaAjv ,
9
8
} from "../envConfigSchema" ;
10
- dotenv . config ( ) ;
11
9
12
10
const envConfig = envSchema < EnvConfig > ( {
13
11
ajv : envSchemaAjv ,
14
12
dotenv : true ,
15
13
schema : envConfigSchema ,
16
14
} ) ;
17
15
18
- const DATABASE_URL = `postgres://${ envConfig . API_POSTGRES_USER } :${ envConfig . API_POSTGRES_PASSWORD } @${ envConfig . NODE_ENV === "test" ? process . env . API_POSTGRES_TEST_HOST : envConfig . API_POSTGRES_HOST } :${ envConfig . API_POSTGRES_PORT } /${ envConfig . API_POSTGRES_DATABASE } ` ;
16
+ const DATABASE_URL = `postgres://${ envConfig . API_POSTGRES_USER } :${ envConfig . API_POSTGRES_PASSWORD } @${ envConfig . API_POSTGRES_HOST } :${ envConfig . API_POSTGRES_PORT } /${ envConfig . API_POSTGRES_DATABASE } ` ;
19
17
20
18
let client : postgres . Sql ;
21
19
You can’t perform that action at this time.
0 commit comments