Getting Started
Primer
Please first take a look at the base GitHub repository https://github.com/julianpoy/recipesage. The README file there describes the basic approach and setup of the project.
Development Tools
At a minimum, you'll want to install:
- Node
- Docker
Setting Up Your Development Environment
- Install Docker and Node
- Clone this repo
- Create a
.env
file in the root of the repository usingexample.env
as a template. These can be left as placeholders, but the dependent functionality will not work without a real key in place. - Install dependencies by running
npm install
at the root of the repo. - Start the Docker containers by running
docker compose up -d
in the cloned repo - Run database migrations
docker compose exec backend npx prisma migrate dev
- RecipeSage should be running on
localhost
on port `80``
Building
New code changes
All of the dev containers auto-reload. There is no need to down/up containers unless dependencies in package.json
have been changed. It is recommended only to pass --build
whenever you change these dependencies.
For example:
docker compose up --build -d
Running Tests
Validate schema
docker compose exec backend npx prisma validate
Backend tests
docker compose exec backend env NODE_ENV=test POSTGRES_LOGGING=false npx nx test backend