/ts-api-template

Simple API template to help speed up development of new Applications

Primary LanguageTypeScript

TS-Api-Template

Test Deploy to Amazon ECS

Summary

This api is built with a modular arquitechture aproach, new functionality is added with new modules that share some of its services and utility, routes are registered in the server as the application develop and validation on the api side is done using JSON.schemas.

Pros

  • Easy to get context for how the application works
  • Good for expanding functionality with code cohesion.
  • Better test structure and easy to integrate new services.

Cons

  • Code base is bigger than other aproachs, less abstraction in favor of code clarity.

🚀 Requirements

  • Docker
  • Docker-compose (for local development)
  • nodejs >=16

🏁 Getting started

docker-compose up -d --build

Run development Environment

docker-compose up -d --build

Api is running on:

http://0.0.0.0:3001/docs

Run Integration tests

change .env DB url to test URL, instructions on comments in the .env file

docker-compose up -d --build

run tests
npm run test:init

For more information on local tests and db schemas go to Tests and Schemas