/microservice-template

Template for an event-driven microservice deployed on GCP Cloud Run. Leverages NestJs, Knex, express

Primary LanguageTypeScript

Node Finance Logo

Template Repository

A template to quickly bootstrap a repo for serverless microservices. Separates logic between server, cron jobs, and workers.

  • 🚀 Server uses NestJs
  • ⏰ Cron jobs are powered by CLI parsing and GCP
  • 👷‍♂️ Worker client is a lightweight express app to respond to messages posted to broker

Installation

$ yarn install

Running the app

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

Test

# unit tests
$ yarn test

# integration tests
$ yarn test:integration

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov