Skip to content

🔷🌍 TypeScript API Skeleton: Bootstrap your new TypeScript backend project (forked from @CodelyTV's amazing base!)

Notifications You must be signed in to change notification settings

BoscoDomingo/typescript-api-skeleton

 
 

Repository files navigation

TypeScript | Node.js | Express.js API Bootstrap (template)

This repository is intended to serve as a starting point if you want to bootstrap a quick API project in TypeScript.

⚠️ It is meant for simple use cases where you don't need the extra complexity, just a barebones, simple Node.js API. This has its shortcomings:

  • No proper DI framework/container/tool
  • No Clean Architecture structuring (I strongly suggest a DDD approach)
    • Coupling of infrastructure and application layers unless you separate them yourself

If these issues don't matter for your intended use, or you know how to fix them, this will be a fast way to have an API running. If you're looking for a more scalable strategy, check my TS DDD template (coming soon™) or if you're looking for a simple, plain Node.js app look at my TypeScript Node.js Template

Features

Local dev

Action Command Description
Install dependencies npm i Installs the necessary dependencies
Compile npm run build Transpiles TS into JS
Compile (Production) npm run build:prod Transpiles TS into JS removing unnecessary artifacts
Run npm run start Runs the compiled JS
Dev npm run dev Runs the TypeScript code and watches for changes
Debug npm run dev:debug Same as Dev but also attaches the debugger

Testing

Jest

Action Command Description
Test npm run test Runs all the tests

Formatting

Action Command Description
Format npm run format Ensures code follows style guides

Linting

Action Command Description
Lint npm run lint Runs the linter and points out mistakes
Lint + Fix npm run lint:fix Same as above but fixing auto-fixable problems

About

🔷🌍 TypeScript API Skeleton: Bootstrap your new TypeScript backend project (forked from @CodelyTV's amazing base!)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 58.3%
  • JavaScript 41.7%