This is a backend boilerplate code for ExpressJS in TypeScript.
- TypeScript
- ExpressJS
- Prisma
- ESLint
- Prettier
- Jest
- Docker
- Docker Compose
- PostgreSQL
Ensure you have the following installed on your local machine:
- Node.js (>= 14.15.0)
- Docker
- Docker Compose
- Prisma
- PostgreSQL (>= 12.0)
- Yarn
- Postman (for API testing)
- VSCode (or any other code editor)
- Clone the repository
git clone git@github.com:funkycadet/express-typescript-boilerplate.git
- Install dependencies
yarn install
- Start the database
docker compose up -d db
- Run database migrations
yarn migration:deploy
- Generate Prisma client
yarn migration:generate
- Seed the database
yarn prisma:seed
- Start the server
yarn start:dev
Visit http://0.0.0.0:7000/health
in your browser to see if the server is running.
If you would prefer to use Docker to spin up the server, you can run the following command:
docker compose up -d
To check the logs, run:
docker compose logs -f {service-name}
where service name is the name of the service you want to check the logs for.
This project is licensed under the MIT License - see the LICENSE file for details.
For API documentation, visit this link