4.0.12 • Published 2 years ago

@iopa/flipper-client v4.0.12

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

IOPA @iopa/flipper-client

NPM

NPM

About

IOPA Middleware to provide client connection to Flipper Desktop flipper-plugin-iopa-logs and to automatically launch the flipper browser edition.

Usage

import { RouterApp } from 'iopa'
import FlipperMiddleware from '@iopa/flipper-client'
import TraceMiddleware from '@iopa/trace'
import { listen } from '@iopa/edge-nodejs'

const app = new RouterApp()

if (process.env.NODE_ENV !== 'production') {
  app.use(FlipperMiddleware, 'Flipper 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