Skip to content

ganatoly/hashmap

Repository files navigation

HashMap

Description

HashMap microservice using NestJS and PostgeSQL

OpenAPI documentation

Online json: http://localhost:4500/swagger-json

WebUI: http://localhost:4500/swagger

Healthcheck

http://localhost:4500/health

Monitoring (prometheus)

Prom expressions:

  • hm_request_count (counter)
  • hm_response_elapsed_time (histogram)

App metrics endpoint: http://localhost:4500/metrics

Prometheus UI: http://localhost:9090

Installation and Local launch

# create `.env` with the environment variables listed below
# or copy from sample:
$ cp .env.sample .env

# install deps
$ npm install

# run service only
$ npm run start

# or run docker compose with DB and prometheus
$ npm run docker:dev

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

# Docker compose development mode
$ npm run docker:dev

# Docker compose production mode
$ npm run docker:prod

Environment variables

Name Description
POSTGRES_HOST pg database host (not use in docker compose)
POSTGRES_PORT pg database port (defaults to 5432)
POSTGRES_USER pg database user
POSTGRES_PASSWORD pg database password
POSTGRES_DB pg database name
APP_PORT port to run http server on (defaults to 4500)
GRPC_PORT port to run gRPC server on (defaults to 5000)

Also, please, consider looking at .env.sample.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published