Skip to content

Commit

Permalink
Merge pull request #56 from kiwijos/test-database-env
Browse files Browse the repository at this point in the history
use env for database name
  • Loading branch information
kiwijos authored Oct 25, 2023
2 parents 932d305 + 5e6b1d8 commit e1b3a16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ async function startDb() {
uri = process.env.MONGO_URI_TEST;
}

await mongoose.connect(uri, { dbName: "trains" });
await mongoose.connect(uri, { dbName: process.env.DATABASE_NAME ?? "trains" });
}

export default startDb;

0 comments on commit e1b3a16

Please sign in to comment.