Rust/BootStrap

Start project

Run - auto reload

Bootstrap

# bash shell commands xshell #or duct #or https://docs.rs/tokio/1.32.0/tokio/process/struct.Command.html

# async library cargo add tokio --features full

# encoding cargo add serde --features "derive" cargo add serde_json

# generic error Result<> cargo add anyhow

# dot env cargo add dotenvy

# web server # options actix_web axum warp # cargo add rocket # 2023-09 build err :( cargo add actix_web # jsonwebtoken cargo add axum cargo add axum-extra --features "cookies" cargo add tower-http --features "fs,trace" # serve static files

# SQL / Database #sqlx cargo add diesel --features "sqlite" # ,postress,mysql" cargo add libsqlite3-sys --features "bundled" cargo install diesel_cli # cli for diesel orm # echo DATABASE_URL=postgres://username:password@localhost/diesel_demo > .env # diesel setup # diesel migration generate create_posts echo "diesel::prelude::*;" >> src/main.rs

}}}

Rust/BootStrap (last edited 2023-11-11 01:44:18 by PieterSmit)