Skip to content

Commit

Permalink
📝 some minor documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
James Holman committed Jan 29, 2020
1 parent 7fb8790 commit 254570d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY ./Cargo.toml ./Cargo.toml

# Caching deps
RUN cargo build --target x86_64-unknown-linux-musl --release
RUN rm target/x86_64-unknown-linux-musl/release/deps/readspacer*
RUN rm target/x86_64-unknown-linux-musl/release/deps/rust*

# Replacing with actual src
RUN rm src/*.rs
Expand Down
28 changes: 23 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
Original Rest API & DB connection is inspired by:
https://turreta.com/2019/09/21/rest-api-with-rust-actix-web-and-postgresql-part-3/
# Dockerize Graphql Rust

Graphql setup is inspired by:
https://www.freecodecamp.org/news/building-powerful-graphql-servers-with-rust/
This project is currently for demonstrating the use of dataloaders in a rust-based graphql server.
This demo uses:

The dockerfile is all me baby :)
- `actix-web` a high-performance webserver for rust https://www.techempower.com/benchmarks/
- `juniper` a popular rust graphql framework https://github.com/graphql-rust/juniper
- A dockerfile which creates a _from scratch_ minimal sized container
- Cults (more to be added)


There are definitely some improvements to be made in db requests, pagination etc. Let me know if you spot anything you think is top-priority!

## Running locally

simple as `docker-compose up`, crazy!
Then navigate to http://localhost:8000/graphql

## TODO

Expand All @@ -22,3 +28,15 @@ simple as `docker-compose up`, crazy!
- [ ] Dataloaders
- [x] Auth?
- [ ] DB pool


## References

Original Rest API & DB connection is inspired by:
https://turreta.com/2019/09/21/rest-api-with-rust-actix-web-and-postgresql-part-3/

Graphql setup is inspired by:
https://www.freecodecamp.org/news/building-powerful-graphql-servers-with-rust/

Rust containerization initially inspired by:
https://alexbrand.dev/post/how-to-package-rust-applications-into-minimal-docker-containers/

0 comments on commit 254570d

Please sign in to comment.