Skip to content

Commit

Permalink
fix: database URL env
Browse files Browse the repository at this point in the history
  • Loading branch information
andrechristikan committed Nov 10, 2024
1 parent 736bfae commit 484bba6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ MIDDLEWARE_CORS_ORIGIN=*
URL_VERSIONING_ENABLE=true
URL_VERSION=1

DATABASE_URI=mongodb://localhost:27017,localhost:27018,localhost:27019/ack?retryWrites=true&w=majority&replicaSet=rs0
DATABASE_URL=mongodb://localhost:27017,localhost:27018,localhost:27019/ack?retryWrites=true&w=majority&replicaSet=rs0
DATABASE_DEBUG=true

AUTH_JWT_ISSUER=https://example.com
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: ack

services:

redis:
image: redis:latest
container_name: redis
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ack-nestjs-boilerplate",
"version": "7.1.1",
"version": "7.1.2",
"description": "Ack NestJs Boilerplate",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/configs/database.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default registerAs(
'database',
(): Record<string, any> => ({
url:
process.env?.DATABASE_URI ??
process.env?.DATABASE_URL ??
'mongodb://localhost:27017,localhost:27018,localhost:27019',

debug: process.env.DATABASE_DEBUG === 'true',
Expand Down
2 changes: 1 addition & 1 deletion test/app/dtos/app.dto.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('AppEnvDto', () => {
URL_VERSIONING_ENABLE: true,
URL_VERSION: 1,

DATABASE_URI: faker.internet.url(),
DATABASE_URL: faker.internet.url(),
DATABASE_DEBUG: false,

AUTH_JWT_ISSUER: faker.internet.url(),
Expand Down

0 comments on commit 484bba6

Please sign in to comment.