Skip to content

Commit

Permalink
Adjusted connection string management and Docker Compose in PostgreSQ…
Browse files Browse the repository at this point in the history
…L sample
  • Loading branch information
oskardudycz committed Oct 23, 2024
1 parent a03cb2c commit 3cfe87e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
container_name: emmett_api
profiles: [app]
environment:
- ESDB_CONNECTION_STRING=esdb://eventstoredb:2113?tls=false
- POSTGRESQL_CONNECTION_STRING=postgresql://postgres@postgres:5432/postgres
networks:
- postgresql_network
ports:
Expand Down
3 changes: 2 additions & 1 deletion samples/webApi/expressjs-with-postgresql/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { Application } from 'express';
import shoppingCarts, { type ShoppingCartConfirmed } from './shoppingCarts';

const connectionString =
'postgresql://dbuser:[email protected]:3211/mydb';
process.env.POSTGRESQL_CONNECTION_STRING ??
'postgresql://postgres:postgres@localhost:5432/postgres';

const eventStore = getPostgreSQLEventStore(connectionString, {
projections: projections.inline(shoppingCarts.projections),
Expand Down

0 comments on commit 3cfe87e

Please sign in to comment.