Requirements:
- Node.js v18 or higher
- A PostgreSQL instance, or Docker.
# 1. install the project dependencies
npm install
# 2. copy .env.template to .env
cp .env.template .env
# 3. fill out .env with your environment variables
# 4. run Prisma migrations
npx prisma migrate dev
# 5. start the project in watch mode
npm run start:dev
The API will now be available at http://localhost:3000/
.
Docker is recommended for running the development and test databases.
Use the following scripts:
# initialize the development database
npm run db:dev:up
# stop the development database
npm run db:dev:rm
# restart the development database
npm run db:dev:restart
# initialize the testing database
npm run db:test:up
# stop the testing database
npm run db:test:rm
# restart the testing database
npm run db:test:restart
- NestJS - Node.js framework for building efficient, reliable and scalable server-side applications.
- Prisma with PostgreSQL - ORM and data storage.
- PostGIS - Geographic data storage and processing.
- Jest and PactumJS - End-to-end testing.
- Docker - Development and testing environments with containerized databases.
- Cloudinary - Cloud service for image upload and delivery.
This project is configured with:
- husky for Git hooks
- runs lint-staging, eslint and prettier on pre-commit
- runs tests on pre-push
- validates commit message with commitlint on commit-msg
- commitizen with commitlint for enforcing conventional commits: <type>[optional scope]: <description>
- for reference: conventional commits