rest-api-boilerplate

Typescript-based REST API boilerplate with full integration tests

Stars
9

Template updated, visit https://github.com/nya1/ts-api-boilerplate


TypeScript REST API Sample

Basic rest api setup to quickly bootstrap a project based on TypeScript and popular & maintened modules.

Features

  • Use decorators to describe endpoints and middlewares (thanks to routing-controllers)
  • Automatically create a OpenAPI v3 (swagger) file with minimal effort (based on decorators used - thanks to routing-controllers-openapi)
  • Jest for tests with code coverage (text summary and HTML)
  • Unit and integration tests setup, integration tests can be run also against compiled JS server
  • Dependency Injection via Inversify
  • Linter setup (ESLint + Prettier)
  • Configuration via TOML files (using node-config)
  • Automatically reloads the server if a file changes while developing
  • Flexibile logging with winston
  • Validate configuration before deployment against a json schema
  • Optional deployment setup via Serverless (AWS) as a Lambda

The goal of this project is to provide a simple, easy to use base to build new rest apis.

Documentation

Getting started

Clone this repository

git clone [email protected]:nya1/rest-api-boilerplate.git my-api-project

Install

cd my-api-project && yarn install


Using the following modules

Related Projects