Here we use PostgreSQL instead of SQLite with the prebuilt static frontend.
For when you really need to debug some deployment stuff locally.
Setup:
createdb ourbigbook
psql -c "CREATE ROLE ourbigbook_user with login password 'a'"
psql -c 'GRANT ALL PRIVILEGES ON DATABASE ourbigbook TO ourbigbook_user'
echo "SECRET=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 256)" >> web/.env
Run after every modification
npm run build-prod
npm run start-prod
and then visit the running website at: localhost:3000/
To optionally nuke the database and create the demo data:
npm run seed-prod
or alternatively to start from a clean database:
psql -c "DROP DATABASE ourbigbook"
createdb ourbigbook
psql -c 'GRANT ALL PRIVILEGES ON DATABASE ourbigbook TO ourbigbook_user'
You can inspect the database interactively with:
psql ourbigbook
and then running SQL commands.

Ancestors