GithubHelp home page GithubHelp logo

baitcenter / rust-web-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from svenstaro/rust-web-boilerplate

0.0 1.0 0.0 115 KB

Rust web template for modern web backend applications

License: MIT License

TSQL 1.89% PLpgSQL 3.29% Shell 0.65% Rust 94.17%

rust-web-boilerplate's Introduction

Rust Web Boilerplate

Build Status codecov dependency status lines of code 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-watch

Optionally if you want line coverage from your tests, install cargo-tarpaulin:

RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install --force 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

rust-web-boilerplate's People

Contributors

andantonyan avatar dependabot-preview[bot] avatar dependabot-support avatar hatzel avatar nukesor avatar revgum avatar svenstaro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.