@iopa/logger
v4.0.12
Published
IOPA Middleware to provide console logger
Downloads
8
Readme
@iopa/flipper-client
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