Rust + Rocket RealWorld framework implementation
Clone or download
TatriX feat: Upgrade codebase to use rocket 0.4
This contains only minimal changes to make it compile.
Latest commit 5fba815 Jan 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
migrations Add comments Feb 15, 2018
src feat: Upgrade codebase to use rocket 0.4 Jan 9, 2019
tests feat: Upgrade codebase to use rocket 0.4 Jan 9, 2019
.env hacking Jan 18, 2018
.gitignore hacking Jan 18, 2018
.travis.yml chore(ci): Disable newman Apr 5, 2018
Cargo.toml
init.sql
logo.png Update project structure Jan 23, 2018
readme.md Update readme.md (#6) Oct 8, 2018

readme.md

RealWorld Example App

Build Status

Rust / Rocket codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.

RealWorld

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.

Getting started

Install nightly

# install rustup
curl https://sh.rustup.rs -sSf | sh

rustup install nightly
rustup default 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
# from another term or use postman
cargo test -- --test-threads=1

How it works

Checkout Rocket's amazing guide

Features

To use random suffixes for articles, compile with random_suffix feature.

cargo run --feature random_suffix

TODO

  1. Use insert into table (...) select
  2. Error handling: either failure or error_chain