https://github.com/danielm/api-with-rust-and-docker
A Rust (Artix) and Docker(composer) boilerplate project to build an API
https://github.com/danielm/api-with-rust-and-docker
actix actix-web chrono docker docker-compose env-logger json rust serde
Last synced: 3 months ago
JSON representation
A Rust (Artix) and Docker(composer) boilerplate project to build an API
- Host: GitHub
- URL: https://github.com/danielm/api-with-rust-and-docker
- Owner: danielm
- License: gpl-3.0
- Created: 2022-08-28T02:02:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-28T16:14:21.000Z (almost 4 years ago)
- Last Synced: 2025-01-28T02:22:28.176Z (over 1 year ago)
- Topics: actix, actix-web, chrono, docker, docker-compose, env-logger, json, rust, serde
- Language: Rust
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Building APIs with Rust
Includes Actix, serde, Env logger and chrono. Also Docker-compose to build it as a container.
## Usage
Locally for development:
```
$ cargo run
```
Creating the docker image and running it:
```
$ docker-compose build && docker-compose up
```
Any of both options (by default) will run over: `http://localhost:8080/`.
Check the `.env.template` to tweak any of these options.
Includes `http://localhost:8080/health` as a JSON-responder example.
### Todo
- Testing
- Benchmarking
- Auto-reloading during dev (cargo watch -x 'run --bin app')
- Healthchecking
- Web Sockets Example
- Review error handling
- Database Connection: This is very project dependent, so idk
- Disel ORM: idem as previous
- Rocket Example, some day when i actually decide to try it
- Server side events: probably not, but maybe yes, we got WS now so why bother?