Skip to content

Commit 90e5828

Browse files
authored
Merge pull request #83 from CodelyTV/part_four
Part four of the TS DDD Course
2 parents 98a8a05 + 6d27b8e commit 90e5828

File tree

137 files changed

+4231
-2176
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+4231
-2176
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
run: |
2626
npm install
2727
npm run build --if-present
28+
npm run lint
2829
npm test
2930
env:
3031
CI: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ dist/
44
logs/
55
src/Contexts/Mooc/Courses/infrastructure/persistence/courses.*
66
data
7+
test-results.xml

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v12.18.3

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
.PHONY = default deps build test start clean start-database
1+
.PHONY = default deps build test start-mooc-backend clean start-database start-backoffice-frontend
22

33
# Shell to use for running scripts
44
SHELL := $(shell which bash)
55
IMAGE_NAME := codelytv/typescript-ddd-skeleton
66
SERVICE_NAME := app
7+
MOOC_APP_NAME := mooc
8+
BACKOFFICE_APP_NAME := backoffice
79

810
# Test if the dependencies we need to run this Makefile are installed
911
DOCKER := $(shell command -v docker)
@@ -28,9 +30,13 @@ build:
2830
test: build
2931
docker-compose run --rm $(SERVICE_NAME) bash -c 'npm run build && npm run test'
3032

31-
# Start the application
32-
start: build
33-
docker-compose up $(SERVICE_NAME) && docker-compose down
33+
# Start mooc backend app
34+
start-mooc-backend: build
35+
docker-compose up $(MOOC_APP_NAME)-backend && docker-compose down
36+
37+
# Start backoffice frontend app
38+
start-backoffice-frontend: build
39+
docker-compose up $(BACKOFFICE_APP_NAME)-frontend && docker-compose down
3440

3541
# Clean containers
3642
clean:

cypress.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"video": false,
3+
"screenshotOnRunFailure": false,
4+
"testFiles": "**/*.cypress.*",
5+
"integrationFolder": "tests/apps",
6+
"fixturesFolder": "tests/utils/cypress/fixtures",
7+
"pluginsFile": "tests/utils/cypress/plugins/index.ts"
8+
}

docker-compose.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
version: '3.8'
22

3+
x-app-service: &default-app
4+
build: .
5+
command: ''
6+
environment:
7+
- MONGO_URL=mongodb://mongo:27017/dev
8+
depends_on:
9+
- mongo
10+
volumes:
11+
- .:/code:delegated
12+
- node_modules:/code/node_modules:delegated
13+
314
services:
415
app:
5-
build: .
16+
<<: *default-app
17+
18+
mooc-backend:
19+
<<: *default-app
620
command: bash -c "npm run build && npm run start"
721
ports:
822
- 3000:3000
9-
environment:
10-
- MONGO_URL=mongodb://mongo:27017/dev
11-
depends_on:
12-
- mongo
13-
volumes:
14-
- .:/code:delegated
15-
- node_modules:/code/node_modules:delegated
23+
24+
backoffice-frontend:
25+
<<: *default-app
26+
command: bash -c "npm run build && npm run start:backoffice:frontend"
27+
ports:
28+
- 8032:8032
1629

1730
mongo:
1831
image: mongo:3.4.6

0 commit comments

Comments
 (0)