- This is a full stack app for managing tasks. Frontend in React and backend with Rust.
-[] Backend user authentication (sign-in, log-in/out) -[] Frontend React boilerplate and views
docker compose up -d --wait
cd server && cargo watch
cd frontend && pnpm start // note frontend not done yet
docker compose up
// get interactive shell inside this container (run above)
docker compose exec database /bin/bash // where database is the service name
root@1313b5f6764a:/# psql -U postgres -d postgres //<username><database>
postgres=# \dt // shows list of tables
postgres=# select \* from tasks; // any regular sql allowed here - don't forget the semicolon
ctrl+c // to quit
//--------------------------------
docker compose down // removes database containers but doesnt remove volume
docker volume ls // to reset the db remove the value
docker volume remove intro-axum-todo_db-data
docker compose up -d --wait // deamon mode = run in the background - now will rerun the init script here: database/init.sql
// --wait=there's a healthcheck script in the docker-compose file
sea-orm-cli generate entity -o src/database
docker compose logs database // name of the service
- If
address already in use
shown when trying to start database do:
sudo lsof -i -P -n | grep 5432 // this shows the current process which is using the database
then
sudo kill <current process id> // this will kill it