https://github.com/mbari-org/rust-microservice
experimentation with actix, tokio, postgres, barrel...
https://github.com/mbari-org/rust-microservice
Last synced: 10 months ago
JSON representation
experimentation with actix, tokio, postgres, barrel...
- Host: GitHub
- URL: https://github.com/mbari-org/rust-microservice
- Owner: mbari-org
- License: unlicense
- Created: 2022-07-29T21:13:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-21T21:33:01.000Z (almost 3 years ago)
- Last Synced: 2025-02-04T21:43:20.645Z (11 months ago)
- Language: Rust
- Size: 36.1 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: news-contract/Cargo.toml
- License: LICENSE
Awesome Lists containing this project
README
What's this?
A repo with some experimentation with actix, tokio, postgres,
diesel, juniper, ...
Refs:
- https://diesel.rs/
- https://github.com/graphql-rust/juniper
- https://dev.to/open-graphql/building-powerful-graphql-servers-with-rust-3gla
- https://medium.com/@ilegra/building-a-microservice-with-rust-ef9641cf2331
- https://medium.com/tenable-techblog/building-a-microservice-with-rust-23a4de6e5e14
Status: all very basic.
### Build
```bash
cargo build
```
### Database setup
In a separate terminal:
```bash
just run-postgres
```
Create database:
```bash
just db-create
```
### Run service
```bash
just run-service
```
### Test it
In a separate terminal:
```bash
just db-news-all
just db-news-add-some
just db-news
just db-news-all
just db-news-delete
just db-news-delete-all
```
### initial setup
The initial commit in this repo was with an exact copy of
[rust-playground/rust-microservice](
https://github.com/diegopacheco/rust-playground/tree/4bf783410c6dc112212564aae32701889c79bc12/rust-microservice
) (thanks Diego for the cool resources).