/rust-graphql-with-dataloader

A Rust GraphQL API with actix-web, juniper, diesel and dataloader

Primary LanguageRust

rust-graphql-with-dataloader

A Rust GraphQL API with actix-web, juniper, diesel and dataloader

Starting

Just run, and wait for a while since the initial compilation is slow...

docker-compose up -d 

but after the start the graphql api will be accessible at http://localhost:8080/ you can access a playground at http://localhost:8080/graphql_playground

Development

Consider that for running the project in development mode you should use these commands for starting the database and the Container for building and starting the application.

Initial build for the Images.

docker-compose build

Initialize the Database

docker-compose up -d db

Initialize the API container attaching the bash command

docker-compose run api bash

Run The Database Migrations

diesel migration run

At the bash inside the container

cargo build

For running in the attached mode

cargo run

Production

For running in the production mode just execute the command:

docker-compose up -d