timvancann / my-dad-rocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My Dad Rocks

Uptime Robot status Fly Deploy Status


Rust Badge Leptos Badge Tailwind CSS Badge Docker Badge

MusicBrainz Badge PostgreSQL Badge

Install dev dependencies

cargo install cargo-leptos sqlx-cli
npm install -D tailwindcss prettier prettier-plugin-tailwindcss @tailwindcss/typography daisyui@latest

Running the project in development mode

Run and prepare the database

docker-compose up db -d
sqlx migrate run

Compile tailwindcss and watch for changes

npx tailwindcss -i ./input.css -o ./style/tailwind.css --watch

Run the server and watch for changes

DATABASE_URL=postgres://postgres:tits@localhost:5432/mydadrocks cargo leptos watch

Building the project (make sure the database is running)

cargo sqlx prepare
docker-compose build

Installing Additional Tools

By default, cargo-leptos uses nightly Rust, cargo-generate, and sass. If you run into any trouble, you may need to install one or more of these tools.

  1. rustup toolchain install nightly --allow-downgrade - make sure you have Rust nightly
  2. rustup target add wasm32-unknown-unknown - add the ability to compile Rust to WebAssembly
  3. cargo install cargo-generate - install cargo-generate binary (should be installed automatically in future)
  4. npm install -g sass - install dart-sass (should be optional in future

Dev

cargo install leptosfmt
leptosfmt .

About


Languages

Language:Rust 47.4%Language:CSS 43.3%Language:JavaScript 6.4%Language:TypeScript 2.1%Language:Dockerfile 0.8%Language:SCSS 0.0%