Skip to content

📦 TypeScript API template with TSOA, featuring OpenAPI generation, error handling, and Express.js best practices.

Notifications You must be signed in to change notification settings

thecodearcher/tsoa-api-template

Repository files navigation

Tsoa-api-template

A robust TypeScript-based API template with built-in error handling, logging, and OpenAPI documentation using TSOA.

Features

  • 🚀 TypeScript for type safety and better developer experience
  • 📚 OpenAPI/Swagger documentation using TSOA
  • 🔒 Built-in security with Helmet
  • 📝 Winston logging
  • ⚡️ Express.js for fast, unopinionated routing
  • 🛡️ Rate limiting
  • ✨ ESLint + Prettier for code consistency
  • 🔄 Hot reloading with Nodemon

Prerequisites

  • Node.js >= 18
  • npm or yarn (yarn is preferred)

Installation

  1. Clone the repository:

    git clone [email protected]:thecodearcher/tsoa-api-template.git
    cd tsoa-api-template
  2. Install dependencies:

    yarn install
  3. Create a .env file:

    cp .env.example .env
  4. Start development server:

    yarn dev

API Documentation

Once the server is running, access the Swagger documentation at:

TODO

Read as "Things I'll do when I am not lazy 🥲"

  • Add Prisma ORM for database access
  • Add Docker support??

About

📦 TypeScript API template with TSOA, featuring OpenAPI generation, error handling, and Express.js best practices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published