Demo code for my Web Authentication series, see https://www.dlford.io/series/web-authentication/
- Copy
api/.env.example
toapi/.env
- Start a PostgreSQL instance, e.g. with Docker
docker run --name web-auth-demo-db -e POSTGRES_PASSWORD=changeme -e POSTGRES_USER=webauthuser -p 5432:5432 -d postgres
- Generate the Prisma API from schema
npm --prefix ./api run prisma:generate
- Run database migrations
npm --prefix ./api run prisma:migrate:dev
- Start the app
npm start