Skip to content

noogen-projects/webapp-template

Repository files navigation

webapp-template

Cargo-generate template for web application

Development notes

Setup dependencies and tools:

sudo apt install mariadb-server libmysqlclient20 libmysqlclient-dev libssl-dev
cargo install diesel_cli --no-default-features --features mysql
cargo install wasm-bindgen-cli

Create database and apply migrations:

sudo mysql -u root < db/create_db.sql
diesel migration run

Create test database and apply migrations:

sudo mysql -u root < db/create_test_db.sql
./diesel_test.sh migration run

Build and run:

./build_webclient.sh
cargo run -p webapp-server

Add user via REST API:

curl --header "Content-Type: application/json" --request POST --data '"Vasya"' http://localhost:8080/user

Check the project:

cargo check --all-features --all-targets

Run all tests:

cargo test --all-features --all-targets

Check and perform formatting:

cargo +nightly fmt -- --check
cargo +nightly fmt

About

Cargo-generate template for web application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published