Running the project locally
First, start by installing dependencies:- node.js instructions
- pnpm instructions
- redis instructions
- postgresql
- Docker (optional) (for running postgres)
apps/nuq-postgres/nuq.sql
. Easiest way is to use the docker image inside apps/nuq-postgres
. With Docker running, build the image:
Installing dependencies
First, install the dependencies using pnpm.Running the project
You’re going to need to open 3 terminals.Terminal 1 - setting up redis
Run the command anywhere within your projectTerminal 2 - setting up the service
Now, navigate to the apps/api/ directory and run:Terminal 3 - sending our first request.
Alright: now let’s send our first request.Alternative: Using Docker Compose
For a simpler setup, you can use Docker Compose to run all services:- Prerequisites: Make sure you have Docker and Docker Compose installed
- Copy the
.env.example
file to.env
in the/apps/api/
directory and configure as needed - From the root directory, run:
Tests:
The best way to do this is run the test withnpm run test:snips
.