You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/demos/http-application.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This [HTTP demo application](https://github.com/ankorstore/yokai-showroom/tree/m
13
13
14
14
It provides:
15
15
16
-
- a [Yokai](https://github.com/ankorstore/yokai) application container, with the [HTTP server](../modules/fxhttpserver.md) and [ORM](../modules/fxorm.md) modules to offer the gophers API
16
+
- a [Yokai](https://github.com/ankorstore/yokai) application container, with the [HTTP server](../modules/fxhttpserver.md) and [SQL](../modules/fxsql.md) modules to offer the gophers API
17
17
- a [MySQL](https://www.mysql.com/) container to store the gophers
18
18
- a [Jaeger](https://www.jaegertracing.io/) container to collect the application traces
19
19
@@ -23,27 +23,32 @@ This demo application is following the [recommended project layout](https://go.d
23
23
24
24
-`cmd/`: entry points
25
25
-`configs/`: configuration files
26
+
-`db/`:
27
+
-`migrations/`: database migrations
28
+
-`seeds/`: database seeds
26
29
-`internal/`:
27
-
- `handler/`: HTTP handlers
28
-
- `middleware/`: HTTP middlewares
29
-
- `model/`: models
30
-
- `repository/`: models repositories
31
-
- `service/`: services
32
-
- `bootstrap.go`: bootstrap
33
-
- `register.go`: dependencies registration
34
-
- `router.go`: routing registration
30
+
-`handler/`: HTTP handlers
31
+
-`middleware/`: HTTP middlewares
32
+
-`model/`: models
33
+
-`repository/`: models repositories
34
+
-`service/`: services
35
+
-`bootstrap.go`: bootstrap
36
+
-`register.go`: dependencies registration
37
+
-`router.go`: routing registration
38
+
-`templates/`: HTML templates
35
39
36
40
### Makefile
37
41
38
42
This demo application provides a `Makefile`:
39
43
40
44
```
41
-
make up # start the docker compose stack
42
-
make down # stop the docker compose stack
43
-
make logs # stream the docker compose stack logs
44
-
make fresh # refresh the docker compose stack
45
-
make test # run tests
46
-
make lint # run linter
45
+
make up # start the docker compose stack
46
+
make down # stop the docker compose stack
47
+
make logs # stream the docker compose stack logs
48
+
make fresh # refresh the docker compose stack
49
+
make migrate # run database migrations
50
+
make test # run tests
51
+
make lint # run linter
47
52
```
48
53
49
54
## Usage
@@ -72,7 +77,6 @@ On [http://localhost:8080](http://localhost:8080), you can use:
72
77
|`[GET] /gophers`| List all gophers | REST |
73
78
|`[POST] /gophers`| Create a gopher | REST |
74
79
|`[GET] /gophers/:id`| Get a gopher | REST |
75
-
|`[PATCH] /gophers/:id`| Update a gopher | REST |
76
80
|`[DELETE] /gophers/:id`| Delete a gopher | REST |
0 commit comments