To execute this example, you'll need to install Node.js, Docker, and MongoDB. MongoDB can be installed locally or used in a Docker environment.
- Node.js 22
- MongoDB 7
- Latest Docker engine
-
Build the Docker Image:
docker build -t fastify-boilerplate .
-
Start the Docker Containers:
docker-compose -f docker/docker-compose-test.yml up
-
Install Dependencies:
npm install
-
Start MongoDB:
npm run mongo:start
-
Start the Server:
npm run start
-
Run Tests:
npm run test
-
Build the Project:
make build
-
Run the Database:
make run_database
-
Run the Server:
make run_server
-
Run Tests:
make run_test
-
Stop the Database:
make stop_database
-
Run All (Build, Run Database, Run Server):
make all