#rocket #demo #web

nightly bin+lib realworld

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

1 unstable release

0.5.3 Dec 9, 2019
0.5.2 Dec 9, 2019
0.5.1 Dec 9, 2019
0.5.0 Dec 9, 2019

#63 in #demo

22 downloads per month

Unlicense OR MIT

71KB
1.5K SLoC

RealWorld Example App

Build Status Crates.io codecov

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.

CHANGELOG

Please see the CHANGELOG for a release history.

Getting started

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

Testing

Simply run:

cargo test

You can also check postman/newman. See /tests directory.

How it works

diesel cli uses .env file. Rocket sets database configuration from .env file. Checkout Rocket's amazing guide

Features

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

TODO

  1. Bettter error handling

Dependencies

~24–36MB
~644K SLoC