- 📥 Clone the repository:
git clone https://github.com/Nest-Microservices-Samples/products-microservice.git
cd products-microservice- 📦 Install dependencies:
npm install- 🔧 Set up environment variables: Create a
.envfile based on the provided.env.templateand edit the.envfile to add the required environment variables.
cp .env.template .env- 🐳 Start the PostgreSQL database with Docker Compose: Ensure Docker is installed and run the following command to start the PostgreSQL database:
docker compose up -d- 🗃️ Run Prisma migrations and generate the client:
npx prisma migrate dev
npx prisma generate- 🛠️ Start the application in development mode:
npm run start:dev- 🧪 Test the microservice: Use tools like Postman, Insomnia, or
curlto send HTTP requests to test the microservice endpoints. You can also use these tools to test TCP communication with the gateway.
- For more details about the endpoints and their usage, refer to the
docsfolder or the Postman/Insomnia collection provided. - Learn more about NestJS at nestjs.com.
Built with ❤️ using NestJS.