sparkidev0x1D / express-ts-api

boilerplate code for express app with TS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Express-TS-BoilerPlate-API

Express TS API

Supports Debugging with vs-code

alt text

Integrated test with Jest and Supertest

alt text

  npm i                   #  Install all the packages 
  npm run dev             #  Running on dev 
  npm run build           #  Builds and transpiles to Javascript 
  npm run debug           #  Debug with chrome 
  npm run test            #  to run test suite 
  npm run test-generate   #  run test suite and generate Coverage Report 

Routes

/api - Parent route

 Routes are exported as single instance , which contains all the child routes 
 that will be initiated by the init() method  

src/controller

- Controller Layer for handling http calls

src/drivers

- Database and other external connections

src/helpers

- helper functions for controllers and data-repository

src/middlewares

- middlewares for the express router

src/models

- Models required for database operations

src/query-builder

-Constructing raw queries for Relational Databases alternatives to models 

src/data-repositories

- Database  access layer or abstraction layer

src/response-handler

- Common response handler for http methods

src/routes

- Common Route directory  

/tests

- API test cases  

About

boilerplate code for express app with TS

License:GNU Affero General Public License v3.0


Languages

Language:HTML 51.1%Language:TypeScript 44.9%Language:JavaScript 3.4%Language:Dockerfile 0.6%