authc0d3 / express-prisma-boilerplate

A backend boilerplate with TS, Express and Prisma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“ Node TypeScript Backend Boilerplate

⚑ Express + Prisma + ESLint + Prettier + Jest + Supertest

A simple boilerplate to start a backend proyect for Node with TypeScript and Express.

βœ… Requirements

You only need Node.js, recommended LTS version. If you prefer, you can optionally use yarn as a package manager.

πŸ‘©β€πŸ’» Get started

  1. Clone this repo
> git clone git@github.com:authc0d3/node-typescript-backend-boilerplate.git
  1. Install dependencies
> cd node-typescript-backend-boilerplate
> npm install
  1. Run database migrations

You need to install MySQL, create a database, modify the DATABASE_URL environment variable to set the correct URL and run the migrations:

> npx prisma migrate dev
  1. Start the server in development mode
> npm run dev

You will check in your browser with this address: http://localhost:8000

πŸ”¬ Testing & Coverage

> npm run test
> npm run test:coverage

πŸš€ Build & run in production

> npn run build
> npm run prod

πŸ› οΈ Customize configuration

You can configure some server properties like port or morgan mode using the .env file.

πŸ“– License

This project is under MIT.

About

A backend boilerplate with TS, Express and Prisma


Languages

Language:TypeScript 82.4%Language:JavaScript 17.1%Language:Shell 0.5%