Crates.io | realworld |
lib.rs | realworld |
version | 0.5.3 |
source | src |
created_at | 2019-12-09 14:00:44.273387 |
updated_at | 2019-12-09 14:32:09.186736 |
description | Rust / Rocket codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API. |
homepage | https://github.com/TatriX/realworld-rust-rocket |
repository | https://github.com/TatriX/realworld-rust-rocket |
max_upload_size | |
id | 187955 |
size | 210,947 |
This codebase was created to demonstrate a fully fledged fullstack application built with Rocket including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Rocket community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
Please see the CHANGELOG for a release history.
Install nightly
# install rustup
curl https://sh.rustup.rs -sSf | sh
rustup install nightly
# start postgresql and seed the database
psql -f init.sql
cargo install diesel_cli --no-default-features --features "postgres"
diesel migration run
cargo run
Simply run:
cargo test
You can also check postman/newman. See /tests
directory.
diesel
cli uses .env
file.
Rocket sets database configuration from .env
file.
Checkout Rocket's amazing guide
By default random suffixes feature is enabled, so one could easily create multiple articles with the same title. To disable it:
cargo run --no-default-features