Heap-recipes is a simple recipe website developed by Hanna Adenholm and Erik Persson.
Based on experience from Erik Persson setting it up from scratch in March 2026. A improved tutorial will come soon (hopefully)
npm install
npm run setup- Start the database
docker compose up db- Backend configuration
Create the file: server/appsettings.json
Replace YOUR_USERNAME and A_STRONG_PASSWORD with your PostgreSQL credentials.
{
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Port=5432;Database=heap_recipes;Username=YOUR_USERNAME;Password=A_STRONG_PASSWORD"
},
"Jwt": {
"Key": "dev-secret-key-12345678901234567890",
"Issuer": "HeapRecipesApi",
"Audience": "HeapRecipesApiUsers",
"ExpireMinutes": "60"
}
}- To set up a database for development, you may create a ´´´docker-compose.override.yml´´´ file with the following content:
services:
db:
ports:
- "5432:5432"This will expose the docker database to port 5432 on your local machine, allowing you to connect to it
- Create a user
Send a POST request to: /api/auth/register
Example request body:
{
"id": 1,
"username": "Hanna"
}
- JWT Tokens uses HS256 and must therefore be at least 32 characters, otherwise it will not work (and be insecure)