Registry / web-framework / ihub-framework-ts

ihub-framework-ts

JSON →
library2.2.3jsnpmunverified

iHub Framework is a Node.js microservices framework designed for the iHub ecosystem. Version 2.2.3 is the current stable release. It provides tools for building microservices with Docker and Kubernetes, including graceful shutdown, environment variable configuration for project, Node.js environment, and logger settings (Elasticsearch and console). The framework is in active development (WIP) and is distributed via a private npm registry. It ships TypeScript types and is primarily used internally within Infracommerce.

npm install ihub-framework-ts
INSTALL
IMPORT
SIG · IHUB-FRAMEWORK-TS
I
ihub-framework-ts
web-frameworkjavascriptv2.2.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Application
import { Application } from 'ihub-framework-ts'
const Application = require('ihub-framework-ts').Application
ESM only; CommonJS require may not work reliably.
Logger
import { Logger } from 'ihub-framework-ts'
import Logger from 'ihub-framework-ts'
Logger is a named export, not default.
Config
import { Config } from 'ihub-framework-ts'
import { Config } from 'ihub-framework-ts/Config'
Export path is incorrect; must use the package directly.

Initializes the Application and Logger with environment variables, then starts the service.

import { Application, Logger } from 'ihub-framework-ts'; const app = new Application({ projectName: process.env.PROJECT_NAME ?? 'my-service', nodeEnv: process.env.NODE_ENV ?? 'development', }); const logger = new Logger({ elasticsearch: { enabled: process.env.LOGGER_ELASTICSEARCH_ENABLED === 'true', url: process.env.LOGGER_ELASTICSEARCH_URL ?? '', level: process.env.LOGGER_ELASTICSEARCH_LEVEL ?? 'info', }, console: { level: process.env.LOGGER_CONSOLE_LEVEL ?? 'debug', }, }); app.use(logger); app.start();
Debug
Known issues
gotchaFramework requires a private npm registry (registry.infracommerce.com.br). You must have access to that registry to install the package.
fix
Create a .npmrc file pointing to the private registry.
affects: >=0.0.0
gotchaDocker is required for development; local Node.js 8+ is discouraged but possible.
fix
Install Docker and Docker Compose and use them for development.
affects: >=0.0.0
gotchaThe framework uses a custom logger that expects Elasticsearch configuration. If not set, it may fail silently.
fix
Ensure LOGGER_ELASTICSEARCH_ENABLED is set to false if not using Elasticsearch.
affects: >=0.0.0
Errors
Common errors & fixes
Module not found: Can't resolve 'ihub-framework-ts'
The package is only available in a private npm registry.
fix
Ensure you have .npmrc with registry=https://registry.infracommerce.com.br/repository/npm-local/ and have access.
TypeError: Cannot read property 'start' of undefined
Application or Logger not imported correctly.
fix
Use named imports: import { Application, Logger } from 'ihub-framework-ts'
Upgrade
Version history
2.2.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
16
OpenAI (training)
2
Resources
ihub-framework-ts — npm install ihub-framework-ts · libregistry