Skip to content

Commit

Permalink
Updated packages in "From CRUD to Event Sourcing" samples
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Jan 4, 2024
1 parent 16c7d5d commit ea62792
Show file tree
Hide file tree
Showing 35 changed files with 3,888 additions and 3,174 deletions.
5 changes: 5 additions & 0 deletions samples/closingTheBooks/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ module.exports = {
'#config': '<rootDir>/config.ts',
'#testing/(.*)': '<rootDir>/src/testing/$1',
},
globals: {
'ts-jest': {
tsconfig: './tsconfig.json',
},
},
};
1 change: 1 addition & 0 deletions samples/eventsVersioning/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
setupFilesAfterEnv: ['./jest.setup.js'],
moduleNameMapper: {
'#core/(.*)': '<rootDir>/src/core/$1',
'#config': '<rootDir>/config.ts',
'#testing/(.*)': '<rootDir>/src/testing/$1',
},
globals: {
Expand Down
11 changes: 11 additions & 0 deletions samples/foundations/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,15 @@ module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
setupFilesAfterEnv: ['./jest.setup.js'],
moduleNameMapper: {
'#core/(.*)': '<rootDir>/src/core/$1',
'#config': '<rootDir>/config.ts',
'#testing/(.*)': '<rootDir>/src/testing/$1',
},
globals: {
'ts-jest': {
tsconfig: './tsconfig.json',
},
},
};
3 changes: 2 additions & 1 deletion samples/from_crud_to_eventsourcing/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"tabWidth": 2,
"singleQuote": true
"singleQuote": true,
"plugins": ["prettier-plugin-sql"]
}
3 changes: 1 addition & 2 deletions samples/from_crud_to_eventsourcing/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"editor.formatOnSave": true,

"editor.codeActionsOnSave": {
// For ESLint
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},

"editor.tabSize": 2,
Expand Down
2 changes: 1 addition & 1 deletion samples/from_crud_to_eventsourcing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The assumption to have such a generic approach was that we're using a rich front
- Postgres DB
- PG Admin - IDE for postgres. Available at: http://localhost:5050.
- Login: `admin@pgadmin.org`, Password: `admin`
- To connect to server click right mouse on Servers, then Register Server and use host: `postgres`, user: `postgres`, password: `Password12!`
- To connect to server click right mouse on Servers, then Register Server and use host: `postgres`, user: `postgres`, password: `postgres`
- EventStoreDB UI: http://localhost:2113/

### CRUD
Expand Down
2 changes: 1 addition & 1 deletion samples/from_crud_to_eventsourcing/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const convictConfig = convict({
postgres: {
connectionString: {
format: String,
default: 'postgres://postgres:Password12!@localhost:5432/postgres',
default: 'postgres://postgres:postgres@localhost:5432/postgres',
arg: 'DATABASE_URL',
env: 'DATABASE_URL',
},
Expand Down
18 changes: 9 additions & 9 deletions samples/from_crud_to_eventsourcing/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: '3'
services:
#######################################################
# EventStoreDB - Event Store
# EventStoreDB
#######################################################
eventstore.db:
image: eventstore/eventstore:21.10.8-buster-slim
eventstoredb:
image: eventstore/eventstore:23.10.0-bookworm-slim
# use this image if you're running ARM-based proc like Apple M1
# image: ghcr.io/eventstore/eventstore:21.10.0-alpha-arm64v8
# image: eventstore/eventstore:23.10.0-alpha-arm64v8
environment:
- EVENTSTORE_CLUSTER_SIZE=1
- EVENTSTORE_RUN_PROJECTIONS=All
Expand All @@ -27,18 +27,18 @@ services:
source: eventstore-volume-logs
target: /var/log/eventstore
networks:
- eventstore.db
- esdb_network

#######################################################
# Postgres
#######################################################
postgres:
image: clkao/postgres-plv8
container_name: postgres
environment:
POSTGRES_PASSWORD: Password12!
image: postgres:15.1-alpine
ports:
- '5432:5432'
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
networks:
- postgres

Expand Down
Loading

0 comments on commit ea62792

Please sign in to comment.