🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

guidesmiths-microservice-example

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

guidesmiths-microservice-example

An example microservice using systemic, confabulous and prepper

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

svc-example

An example service using

  • systemic
  • confabulous
  • prepper
  • systemic-express
  • systemic-pg
  • marv
  • groundhog-day

Features

  • Environmental configuration
  • Secrets obtained from a runtime location
  • Automatically applies schema changes on startup
  • Automatically detects and applies runtime config changes
  • Orderly startup / shutdown (e.g. establishes database connections before setting up http listeners and vice versa)
  • Graceful shutdown on errors, unhandled rejections, unhandled exceptions, SIGINT and SIGTERM
  • Useful log decorators, including request scoped logging
  • JSON logging to stdout in "proper" environments, human friendly logging locally
  • The Dockerfile uses settings from .npmrc and .nvmrc
  • The docker build cache busts using package.json and npm-shrinkwrap.json so npm install only runs when necessary
  • Deployed artifact (a docker image) is traceable back to SCM commit via manifest.json, exposed via /__/manifest endpoint
  • Unit tests use stubbed clock for predictability
  • Unit tests use stubbed persistence store for speed

Running locally

npm run docker
npm start

Running tests

npm test

In container build, test and publish

docker-compose -f docker/docker-compose-build.yml build
docker-compose -f docker/docker-compose-build.yml run --rm -e SERVICE_ENV=build svc-example npm test
docker-compose -f docker/docker-compose-build.yml stop
docker tag quay.io/guidesmiths/svc-example:latest quay.io/guidesmiths/svc-example:$COMMIT
docker push quay.io/guidesmiths/svc-example

Keywords

microservice

FAQs

Package last updated on 22 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts