diff --git a/admin/datasource.ts b/admin/datasource.ts index 769f38b3..4fb6f9da 100644 --- a/admin/datasource.ts +++ b/admin/datasource.ts @@ -14,4 +14,8 @@ export const dataSource = new DataSource({ database: process.env.DB_NAME || "blc", entities: [User, Country, CarbonInputEntity, CostInput], synchronize: false, + ssl: + process.env.NODE_ENV === "production" + ? { rejectUnauthorized: false } + : false, }); diff --git a/package.json b/package.json index 06ecda9d..f2edc4a9 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "api:dev": "pnpm --filter api run start:dev", "api:build": "pnpm --filter api run build", "api:prod": "NODE_ENV=production pnpm --filter api run start:prod", - "admin:prod": "pnpm --filter admin run start:prod", + "admin:prod": "NODE_ENV=production pnpm --filter admin run start:prod", "client:deps": "pnpm --filter client install", "client:dev": "pnpm --filter client run dev", "client:build": "pnpm --filter client run build",