- Go to
./docker
folder:cd docker
. - Run docker compose:
docker compose up
. - Go inside the running docker:
docker exec -it rust-builder bash
. - Inside the docker
\opt\app
folder start server by the commandcargo run
. - Send requests to
localhost:8000
according to API spec in./app/src/my-api-spec.jst
.
Examples:
Good request:curl --location 'http://localhost:8000/users' --data '{"id": 1, "login": "l"}'
.
Bad request:curl --location 'http://localhost:8000/users' --data '{"id": 1}'
.
IMPORTANT! Do not forget to remove jsight::clear_cache()
line in production mode.
Clearing cache reduces performance dramatically.