/TypescriptExpress

Get up and running with a express server written in typescript that is packed with a handful of goodies like IOC principles, Winston logging, JOI validation, Unit Test, and Integration test

Primary LanguageTypeScript

TypescriptExpress

CI Status

About

Get up and running with a express server written in typescript that is packed with a handful of goodies like IOC principles, Winston logging, JOI validation, Unit Test, and Integration test.

Tech Stack Check List

  • Typescript
  • Express
  • Swagger
    • Swagger UI
  • dotenv
  • JOI validation
  • Morgan
  • Jest Unit Test
  • Newman (Postman Integration Test)
  • Docker

Getting Started

With Docker

  1. docker-compose up -d to run the unit test, integration test and start the server
  2. docker-compose down to spin down everything

With node

  1. Run npm i to install the dependencies
  2. Run npm run dev to get a local dev server spun up on port 8080, you can verify its up and running by visiting http://localhost:8080/api-docs/swagger/
  3. Run npm test to run the unit test and print out the coverage of the project
    1. Test can be put into watch mode by running npm run test:watch
  4. Run npm run test:it to run the newman collection runner (if already running the dev server you can just run npm run newman:local)