Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loganintech/rust-zoo-micro
This is a little repository to try writing a microservice arch for a little zoo application. Just a little example.
https://github.com/loganintech/rust-zoo-micro
Last synced: 10 days ago
JSON representation
This is a little repository to try writing a microservice arch for a little zoo application. Just a little example.
- Host: GitHub
- URL: https://github.com/loganintech/rust-zoo-micro
- Owner: loganintech
- Created: 2018-08-25T05:16:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-25T07:41:22.000Z (over 6 years ago)
- Last Synced: 2024-10-18T06:52:37.381Z (4 months ago)
- Language: Rust
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A little microservice program I'm trying to write, for practice.
## Compile & Run
Pre-reqs:
* [Rust](https://rustup.rs)
* [Postgres](https://www.postgresql.org/)Install:
```sh
cargo install diesel_cli --no-default-features --feature postgres
```Migrate Up:
```sh
diesel migration run
```Migrate Down:
```sh
diesel migration revert
```Run:
```sh
cargo run
```## Endpoints
| endpoint | http method | returns |
|---------------------------|-------------|-------------------------------------|
| /animals/\/\ | POST | newly created item |
| /animals | GET | everything we have (up to 20 items) |