chore: add local Postgres, justfile, and env example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 00:51:26 +02:00
parent 67057e2ee3
commit db6183405e
4 changed files with 40 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
# Connection string for local development and tests.
# The role must be allowed to CREATE DATABASE (sqlx::test provisions temp DBs).
DATABASE_URL=postgres://postgres:postgres@localhost:5432/cms_dev
BIND_ADDR=0.0.0.0:8080
APP_NAME=Collection Management System
+1
View File
@@ -1 +1,2 @@
/target /target
.env
+14
View File
@@ -0,0 +1,14 @@
services:
postgres:
image: postgres:17
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: cms_dev
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
+20
View File
@@ -0,0 +1,20 @@
set dotenv-load
# Run the server (reads .env)
run:
cargo run -p server
# Run the full test suite
test:
cargo test --workspace
# Format with the nightly toolchain
fmt:
cargo +nightly fmt
# Lint, treating warnings as errors
lint:
cargo clippy --workspace --all-targets -- -D warnings
# Format, lint, and test
check: fmt lint test