@gradebook/app-core
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

@gradebook/app-core

Config and Logging provider for Applications

Usage

import {logger, config} from '@gradebook/app-core';

// `config` is an instance of `@gradebook/config`
logger.info(config.get('env'));

// Instance of `@gradebook/logging` - logging config comes via `config.get('logging')`
logger.info('Hello, world!');

// With express
import express from 'express';
// HTTP-related logic is not included in the default export by design
import {useLoggingAndHealthcheck} from '@gradebook/app-core/lib/healthcheck.js';
const app = express();

// Will error if healthcheck is disabled in logging config
// Mounts healthcheck endpoint and adds HTTP request logging to the app
useLoggingAndHealthcheck(app);

Dependencies (2)

Dev Dependencies (1)

Package Sidebar

Install

npm i @gradebook/app-core

Weekly Downloads

5

Version

0.1.2

License

MIT

Unpacked Size

6.76 kB

Total Files

14

Last publish

Collaborators

  • vikaspotluri123
  • joshcos97