Giter VIP home page Giter VIP logo

zero2prod's Introduction

Setup

Testing

Project to measure code coverage
cargo install cargo-tarpaulin
cargo tarpaulin --ignore-tests

Linter

cargo clippy
cargo clippy -- -D warnings

Formatting

cargo fmt
cargo fmt -- --check

Security vulnerabilities

cargo install cargo-audit
cargo audit

CI

This project uses github actions for CI

  • Jobs run automatically on push and PRs
  • Must give GITHUB_TOKEN read and write permissions

Tools

Cargo Expand

Install

  • cargo install cargo-expand
  • Needs to use the nightly build rustup toolchain install nightly --allow-downgrade

Run

  • cargo +nightly expand

Cargo Unused Dependencies

Install

  • cargo install cargo-udeps

Run

  • cargo +nightly udeps

Log Formatting

cargo install bunyan
cargo run | bunyan

Database

Set env variable

Create DB in Docker

  • ./scripts/init_db.sh

Add Table

  • sqlx migrate add table_name

Run migrations

  • sqlx migrate run

Testing

cargo test // logs are hidden
RUST_LOG=true cargo test | bunyan

zero2prod's People

Contributors

timjonez avatar

Watchers

James Cloos avatar  avatar

zero2prod's Issues

RUSTSEC-2021-0141: dotenv is Unmaintained

dotenv is Unmaintained

Details
Status unmaintained
Package dotenv
Version 0.15.0
URL dotenv-rs/dotenv#74
Date 2021-12-24

dotenv by description is meant to be used in development or testing only.

Using this in production may or may not be advisable.

Alternatives

The below may or may not be feasible alternative(s):

See advisory page for additional details.

RUSTSEC-2021-0139: ansi_term is Unmaintained

ansi_term is Unmaintained

Details
Status unmaintained
Package ansi_term
Version 0.12.1
URL ogham/rust-ansi-term#72
Date 2021-08-18

The maintainer has adviced this crate is deprecated and will not
receive any maintenance.

The crate does not seem to have much dependencies and may or may not be ok to use as-is.

Last release seems to have been three years ago.

Possible Alternative(s)

The below list has not been vetted in any way and may or may not contain alternatives;

See advisory page for additional details.

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.