/express-typescript-boilerplate

A boilerplate for building RESTful APIs using Node.js(TS), Express, and Prisma

Primary LanguageTypeScriptMIT LicenseMIT

Express-TypeScript-Boilerplate

This is a backend boilerplate code for ExpressJS in TypeScript.

Features

  • TypeScript
  • ExpressJS
  • Prisma
  • ESLint
  • Prettier
  • Jest
  • Docker
  • Docker Compose
  • PostgreSQL

Getting Started

Prerequisites

Ensure you have the following installed on your local machine:

Installation

  1. Clone the repository
git clone git@github.com:funkycadet/express-typescript-boilerplate.git
  1. Install dependencies
yarn install
  1. Start the database
docker compose up -d db
  1. Run database migrations
yarn migration:deploy
  1. Generate Prisma client
yarn migration:generate
  1. Seed the database
yarn prisma:seed
  1. 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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

API Documentation

For API documentation, visit this link