- Git - Download & Install Git
- Node.js - Download & Install Node.js and the npm package manager
- Docker Desktop - Download & Install Docker
- Clone the repository:
git clone https://github.com/seygorin/nodejs2024Q3-service
cd nodejs2024Q3-service- Change .env file in the root directory if you want to change the default port or database credentials.
- Build and start containers:
npm run docker:build # Build containers
npm run docker:up # Start containers and wait a bit- View logs:
npm run docker:logs- Access services:
- API: http://localhost:4000 (default)
- Swagger UI: http://localhost:4000/api
- Prisma Studio: http://localhost:5555 (after running
npm run prisma:studio)
- Stop application:
npm run docker:down- Install dependencies:
npm install- Start the application:
npm run start # Production mode
npm run start:dev # Development mode with watchAccess and manage database using Prisma Studio:
npm run prisma:studioGenerate Prisma client after schema changes:
npm run prisma:generateRun tests:
npm run test # Run all tests without authorizationFormat and lint code:
npm run format # Format code using Prettier
npm run lint # Lint and auto-fix using ESLintScan for vulnerabilities:
npm run scanAfter starting the application, you can explore the API documentation:
- Swagger UI: http://localhost:4000/api
- OpenAPI specification: Available in
/docfolder (api.yaml and api.json)
The application image is available on Docker Hub:
docker pull seygorin/nodejs2024q3:latestOr by link.