Skip to content

Commit

Permalink
doc(main): Updated documentation (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekkinox committed Aug 8, 2024
1 parent 446bb92 commit 39f01ea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/getting-started/grpc-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ icon: material/rocket-launch-outline
The [gRPC application template](https://github.com/ankorstore/yokai-grpc-template) provides:

- a ready to extend [Yokai](https://github.com/ankorstore/yokai) application, with the [gRPC server](../modules/fxgrpcserver.md) module installed
- a ready to use [dev environment](https://github.com/ankorstore/yokai-grpc-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/cosmtrek/air) (for live reloading)
- a ready to use [dev environment](https://github.com/ankorstore/yokai-grpc-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/air-verse/air) (for live reloading)
- a ready to use [Dockerfile](https://github.com/ankorstore/yokai-grpc-template/blob/main/Dockerfile) for production
- some examples of [service](https://github.com/ankorstore/yokai-grpc-template/blob/main/internal/service/example.go) and [test](https://github.com/ankorstore/yokai-grpc-template/blob/main/internal/service/example_test.go) to get started

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/http-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ icon: material/rocket-launch-outline
The [HTTP application template](https://github.com/ankorstore/yokai-http-template) provides:

- a ready to extend [Yokai](https://github.com/ankorstore/yokai) application, with the [HTTP server](../modules/fxhttpserver.md) module installed
- a ready to use [dev environment](https://github.com/ankorstore/yokai-http-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/cosmtrek/air) (for live reloading)
- a ready to use [dev environment](https://github.com/ankorstore/yokai-http-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/air-verse/air) (for live reloading)
- a ready to use [Dockerfile](https://github.com/ankorstore/yokai-http-template/blob/main/Dockerfile) for production
- some examples of [handler](https://github.com/ankorstore/yokai-http-template/blob/main/internal/handler/example.go) and [test](https://github.com/ankorstore/yokai-http-template/blob/main/internal/handler/example_test.go) to get started

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/worker-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ icon: material/rocket-launch-outline
The [worker application template](https://github.com/ankorstore/yokai-worker-template) provides:

- a ready to extend [Yokai](https://github.com/ankorstore/yokai) application, with the [worker](../modules/fxworker.md) module installed
- a ready to use [dev environment](https://github.com/ankorstore/yokai-worker-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/cosmtrek/air) (for live reloading)
- a ready to use [dev environment](https://github.com/ankorstore/yokai-worker-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/air-verse/air) (for live reloading)
- a ready to use [Dockerfile](https://github.com/ankorstore/yokai-worker-template/blob/main/Dockerfile) for production
- some examples of [worker](https://github.com/ankorstore/yokai-worker-template/blob/main/internal/worker/example.go) and [test](https://github.com/ankorstore/yokai-worker-template/blob/main/internal/worker/example_test.go) to get started

Expand Down
8 changes: 6 additions & 2 deletions docs/modules/fxsql.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ modules:
dsn: "user:password@tcp(localhost:3306)/db?parseTime=true" # database DSN
migrations:
path: db/migrations # migrations path (empty by default)
stdout: true # to print in stdout the migration logs (disabled by default)
stdout: true # to print in stdout the migration execution logs (disabled by default)
log:
enabled: true # to enable SQL queries logging (disabled by default)
level: debug # to configure SQL queries logs level (debug by default)
Expand Down Expand Up @@ -166,7 +166,9 @@ You can configure where to find your migration files:
```yaml title="configs/config.yaml"
modules:
sql:
migrations: db/migrations
migrations:
path: db/migrations # migrations path
stdout: true # to print in stdout the migration execution logs
```

And create them following [Goose SQL migrations](https://github.com/pressly/goose?tab=readme-ov-file#sql-migrations) conventions:
Expand Down Expand Up @@ -563,6 +565,8 @@ modules:
dsn: ":memory:" # in memory
```

The [fxgomysqlserver](https://github.com/ankorstore/yokai-contrib/tree/main/fxgomysqlserver) Yokai contrib module is also available if you want to run an embed MySQL server for your tests.

You can then retrieve your components using the `sql.DB`, and make actual database operations:

```go title="internal/example_test.go"
Expand Down

0 comments on commit 39f01ea

Please sign in to comment.