Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svenstaro/rust-web-boilerplate
Rust web template for modern web backend applications
https://github.com/svenstaro/rust-web-boilerplate
best-practices boilerplate diesel rocket web
Last synced: about 1 month ago
JSON representation
Rust web template for modern web backend applications
- Host: GitHub
- URL: https://github.com/svenstaro/rust-web-boilerplate
- Owner: svenstaro
- License: mit
- Created: 2016-12-18T11:23:01.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-02T04:03:20.000Z (almost 2 years ago)
- Last Synced: 2024-09-27T07:21:31.689Z (about 2 months ago)
- Topics: best-practices, boilerplate, diesel, rocket, web
- Language: Rust
- Homepage:
- Size: 148 KB
- Stars: 310
- Watchers: 12
- Forks: 51
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust Web Boilerplate
[![Build Status](https://travis-ci.org/svenstaro/rust-web-boilerplate.svg?branch=master)](https://travis-ci.org/svenstaro/rust-web-boilerplate)
[![codecov](https://codecov.io/gh/svenstaro/rust-web-boilerplate/branch/master/graph/badge.svg)](https://codecov.io/gh/svenstaro/rust-web-boilerplate)
[![lines of code](https://tokei.rs/b1/github/svenstaro/rust-web-boilerplate)](https://github.com/svenstaro/rust-web-boilerplate)
[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/svenstaro/rust-web-boilerplate/blob/master/LICENSE)## About
This is a boilerplate project made using best practices for getting started quickly
in a new project. I made this for myself but maybe it will help someone else. Pull
requests and discussions on best practices welcome!## Development setup
Install a few external dependencies and make sure `~/.cargo/bin` is in your `$PATH`:
cargo install diesel_cli
cargo install cargo-watchOptionally if you want line coverage from your tests, install cargo-tarpaulin:
cargo-tarpaulin
Copy `.env.example` to `.env` and update your application environment in this file.
Make sure you have a working local postgres setup. Your current user should be
admin in your development postgres installation and it should use the "peer" or
"trust" auth methods (see `pg_hba.conf`).Now you can launch the `watch.sh` script which helps you quickly iterate. It
will remove and recreate the DB and run the migrations and then the tests on
all code changes../watch.sh
To get line coverage, do
cargo tarpaulin --ignore-tests