ood_persistence/examples/web
Dmitriy Pleshevskiy 58269f5a64 chore: rename error type and reexport error types
Closes #2
2021-10-21 23:56:47 +03:00
..
database inital commit 2021-10-12 18:14:02 +03:00
src chore: rename error type and reexport error types 2021-10-21 23:56:47 +03:00
.env.example inital commit 2021-10-12 18:14:02 +03:00
Cargo.lock inital commit 2021-10-12 18:14:02 +03:00
Cargo.toml feat: add transactions 2021-10-17 15:13:01 +03:00
Makefile.toml feat: add transactions 2021-10-17 15:13:01 +03:00
Migra.toml inital commit 2021-10-12 18:14:02 +03:00
README.md chore: add usage block in web example 2021-10-21 23:40:36 +03:00
docker-compose.dev.yml inital commit 2021-10-12 18:14:02 +03:00

README.md

Web example

Simple rest api example with hyper, bb8, postgres

Deps

For this example you need to install docker with docker-compose, nightly rust. Follow the instructions on the official sites.

Running

Move to the example directory

cd examples/web

Run configuration for docker-compose

docker-compose -f docker-compose.dev.yml up

Or run postgres server manually.

Then copy .env.example to .env and edit if you needed.

cp .env.example .env

Now you can run server

cargo run --features dev

Or if you have a cargo make

cargo make dev

Usage

Create new list

xh http://localhost:32444/api/lists/ name=hello

Get list

xh http://localhost:32444/api/lists/1