Table of contents
This is a boilerplate for back end development using the following technologies:
-
Node.js
-
Express.js
-
PrismaORM
-
ESLint + Prettier for code Linting
-
Docker for the development environment with
- Node.js v18 (current LTS version)
- PostgreSQL
-
I'm using yarn, but you can use any other package manager, for example npm:
npm run <SCRIPT_NAME>
If you just want to run the development sever, just copy and paste the values from .env.example
to a new .env
file
cp .env.example .env
- If you have Node.js installed, just run
yarn dc:dev
Otherwise, just run the following commands:
- First of all, you need to build containers
docker compose build
- Start containers in detached mode
docker compose up -d
- Enter the node container
docker compose exec app bash
- Install dependencies
yarn
- Run migrations
yarn migrate:run
- If you made changes to
prisma/schema.prisma
, don't forget to create a migration:
yarn migrate:dev