A web application build in Rust. It use Rocket & Diesel. Default Rocket app does not have any boilerplate or scaffolding.
This sample just an application which allow you to CRUD todo.
- List todo: GET /todos
- Create todo: POST /todos
- Show todo: GET /todos/<todo_id>
- New todo: GET /todos/new
- Edit todo: GET /todos/<todo_id>/edit
- Update todo: PUT /todos/<todo_id>
- Delete todo: DELETE /todos/<todo_id>
Demo on Heroku using Rust Buildpack.
First you need to install Rust. Then Clone the repository and go in the folder
$ git clone https://github.com/rezhajulio/RocketTodoMVC.git
$ cd RocketTodoMVC
According to Rocket, you need to use Nightly version of Rust
$ rustup override set nightly
Then install diesel_cli and run database migrations
$ cargo install diesel_cli --no-default-features --features postgres
$ diesel setup
$ diesel migration run
And now you can build project
$ cargo run