@iopa/logger
TypeScript icon, indicating that this package has built-in type declarations

4.0.12 • Public • Published

IOPA
@iopa/flipper-client

NPM

NPM

About

IOPA Middleware to provide console logger

Usage

import { RouterApp } from 'iopa'
import LoggerMiddleware from '@iopa/logger'
import TraceMiddleware from '@iopa/trace'
import { listen } from '@iopa/edge-nodejs'

const app = new RouterApp()

if (process.env.NODE_ENV !== 'production') {
  app.use(LoggerMiddleware, 'Logger Middleware')  // THIS MIDDLEWARE
  app.use(TraceMiddleware, 'TraceMiddleware')
}

app.get('*', async (context, next) => {
  return next()
})

app.build()

async function startServer(): Promise<void> {
  await listen(app)
}

void startServer()

License

Apache-2.0

API Reference Specification

IOPA

Package Sidebar

Install

npm i @iopa/logger

Homepage

iopa.io

Weekly Downloads

0

Version

4.0.12

License

Apache-2.0

Unpacked Size

23.4 kB

Total Files

17

Last publish

Collaborators

  • tinialabs1
  • iopa-admin
  • guycreate