Skip to content

Sample API with ExpressJS, Typescript, Relational Database with Prisma.

Notifications You must be signed in to change notification settings

sinh117801/express-ts-rest-api-boilerplate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExpressJS + Typescript (Boilerplate)

Note: This repo is folk from https://github.com/sunhak-hout/express-ts-api-boilerplate which use MongoDB for database.

All you have been looking for with ExpressJS + Typescript + Relational Database with Prisma:

  • Simple Clean Code Structure
  • Custom Error Handlings
  • Module Aliases
  • Prisma Example
  • Existing Sample Code

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. Feel free to play around ;)

Prerequisites

Make sure your NodeJS and NPM on your local machine is up to date. NodeJS LTS version is recommended.

node --version # v14.16.0 or above
npm --version  # v6.14.11 or above

Installing and Running

Clone the project

git clone https://github.com/sinh117801/express-ts-api-boilerplate.git

Move into the project folder

cd express-ts-api-boilerplate

Config Environment Variables

cp .env.example .env
# set value of each variables in '.env' file

Install dependencies, prisma migration and start

npm install
npx prisma migrate dev
npm run dev

Seeding the data into database

npx prisma db seed --preview-feature

Contributing

All pull requests and feedbacks are welcome and appreciated ;)

Author

Acknowledgments

To all NodeJS and Typescript and other related field contributors, thank you! <3

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.1%
  • Shell 0.9%