File tree 7 files changed +81
-43
lines changed
7 files changed +81
-43
lines changed Original file line number Diff line number Diff line change
1
+ *
2
+ ! src /
3
+ ! * .json
Original file line number Diff line number Diff line change 3
3
This is an application that demonstrates how to use Nest.js, Event Store and Mongo to create a RESTful API microservice.
4
4
5
5
## Prerequisite
6
+
6
7
The following tools must be installed on your computer:
7
- * Docker
8
- * Docker-Compose
8
+
9
+ - Docker
10
+ - Docker-Compose
9
11
10
12
## Installation
11
13
@@ -15,9 +17,13 @@ $ npm install
15
17
16
18
## Running the app in development
17
19
20
+ To handle different image of eventstore based on the architecture ` arm64 ` and ` x86_64 ` run the script
21
+ ` run-dev-env.sh ` .
22
+
18
23
``` bash
19
- # start event-store and mongodb
20
- docker-compose up -d
24
+ # start event-store and mongodb
25
+ $ chmod +x run-dev-env.sh
26
+ $ ./run-dev-sh
21
27
22
28
# development
23
29
$ npm run start
@@ -29,7 +35,14 @@ $ npm run start:dev
29
35
$ npm run start:prod
30
36
```
31
37
32
- ## Test
38
+ ## Clean up Environment
39
+
40
+ ``` bash
41
+ $ chmod +x cleanup-dev-env.sh
42
+ $ ./cleanup-dev-env.sh
43
+ ```
44
+
45
+ ## Test (Coming soon)
33
46
34
47
``` bash
35
48
# unit tests
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ if [[ $( uname -m) == ' arm64' ]]; then
3
+ image=" ghcr.io/eventstore/eventstore:21.10.5-alpha-arm64v8"
4
+ else
5
+ image=" eventstore/eventstore:21.10.5-buster-slim"
6
+ fi
7
+
8
+ EVENTSTORE_IMAGE=$image docker-compose down -v
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ version: '3.9'
2
2
3
3
services :
4
4
eventstore :
5
- image : eventstore/eventstore:21.10.5-buster-slim
5
+ image : ${EVENTSTORE_IMAGE}
6
6
container_name : eventstore
7
7
networks :
8
8
- order-service
Original file line number Diff line number Diff line change 88
88
"commit-msg" : " commitlint -E HUSKY_GIT_PARAMS "
89
89
}
90
90
},
91
- "release" : {
92
- "branches" : [
93
- " main"
94
- ],
95
- "prepare" : [
96
- " @semantic-release/changelog" ,
97
- [
98
- " @semantic-release/npm" ,
99
- {
100
- "npmPublish" : false
101
- }
102
- ],
103
- {
104
- "path" : " @semantic-release/git" ,
105
- "message" : " chore: release ${nextRelease.version}\n\n ${nextRelease.notes}"
106
- }
107
- ],
108
- "publish" : [
109
- " @semantic-release/github" ,
110
- [
111
- " @semantic-release/npm" ,
112
- {
113
- "npmPublish" : false
114
- }
115
- ]
116
- ],
117
- "verifyConditions" : [
118
- [
119
- " @semantic-release/npm" ,
120
- {
121
- "npmPublish" : false
122
- }
123
- ],
124
- " @semantic-release/github"
125
- ],
126
- "success" : false ,
127
- "fail" : false
91
+ "engines" : {
92
+ "node" : " ^12.20.0 || ^14.15.0 || >=16.10.0" ,
93
+ "yarn" : " >=1.9.2 <2.0.0"
128
94
}
129
95
}
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ "branches" : [
3
+ 'main'
4
+ ] ,
5
+ "prepare" : [
6
+ "@semantic-release/changelog" ,
7
+ [
8
+ "@semantic-release/npm" ,
9
+ {
10
+ "npmPublish" : false
11
+ }
12
+ ] ,
13
+ {
14
+ "path" : "@semantic-release/git" ,
15
+ "message" : "chore: release ${nextRelease.version}\n\n${nextRelease.notes}"
16
+ }
17
+ ] ,
18
+ "publish" : [
19
+ "@semantic-release/github" ,
20
+ [
21
+ "@semantic-release/npm" ,
22
+ {
23
+ "npmPublish" : false
24
+ }
25
+ ]
26
+ ] ,
27
+ "verifyConditions" : [
28
+ [
29
+ "@semantic-release/npm" ,
30
+ {
31
+ "npmPublish" : false
32
+ }
33
+ ] ,
34
+ "@semantic-release/github"
35
+ ] ,
36
+ "success" : false ,
37
+ "fail" : false
38
+ } ;
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ if [[ $( uname -m) == ' arm64' ]]; then
3
+ image=" ghcr.io/eventstore/eventstore:21.10.5-alpha-arm64v8"
4
+ else
5
+ image=" eventstore/eventstore:21.10.5-buster-slim"
6
+ fi
7
+
8
+ EVENTSTORE_IMAGE=$image docker-compose up -d
9
+
10
+
You can’t perform that action at this time.
0 commit comments