Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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) |