ihub-framework-ts
TypeScript icon, indicating that this package has built-in type declarations

2.1.5 • Public • Published

iHub Framework (WIP)

iHub Framework allows you to quickly build nodejs microservices with support for all the stack used by the iHub ecosystem.

Requirements

You need to have Docker and Docker Compose installed to develope your microservice, you can develop locally with NodeJS 8+ but we strongly discouraged since your service is going to be deployed with kubernetes.

Installing

First you need to create a .npmrc or change your local npm registry to point for our internal private registry:

registry=https://registry.infracommerce.com.br/repository/npm-local/

Then on your project folder:

$ npm i -S ihub-framework-ts

Graceful Shutdown

The framework treats the shutting down as graceful so we wont lose any data. The ideal is to monitor and adjust the SIGTERM timeout according to each application, the default timeout of docker commands is 10 seconds but depending of your application this time can not be enough, so this must be profiled and align with the responsible of deployment so he can make the correct adjustments.

If you like to test your application and change the docker timeout:

docker stop ----time=30 foo

Environment Variables

Project

PROJECT_NAME NODE_ENV

Logger

Elasticsearch

LOGGER_ELASTICSEARCH_ENABLED LOGGER_ELASTICSEARCH_URL LOGGER_ELASTICSEARCH_LEVEL

Console

LOGGER_CONSOLE_LEVEL

Readme

Keywords

none

Package Sidebar

Install

npm i ihub-framework-ts

Weekly Downloads

33

Version

2.1.5

License

ISC

Unpacked Size

193 kB

Total Files

158

Last publish

Collaborators

  • ihub-front