0.7.0-alpha.1 • Published 3 months ago

@flink-app/debug-plugin v0.7.0-alpha.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Flink API Docs

A FLINK plugin that makes it possible to debug requests in FLINK.

Usage

Install plugin to your flink app project:

npm i -S @flink-app/debug-plugin

Add and configure plugin in your app startup (probable the index.ts in root project):

import { debugPlugin } from '@flink-app/debug-plugin';

function start() {
  new FlinkApp<AppContext>({
    name: "My app",
    plugins: [
        // Register plugin
        debugPlugin({ enabledAtStart: false, logToConsole: false, keepLogs : 100 }),
    ],
  }).start();
}

Use as a management-api-module

This plugin can be exposed as a management-api-module and could after setup be used both from the management-api and from flink-admin.

To enable management-api capabilities, simply craete a managment module and supply it to the managementApiPlugin.

Example index.ts

import { FlinkApp } from '@flink-app/flink';
import { Ctx } from './Ctx';
import {
  debugPlugin,
  GetManagementModule as GetDebugManagementModule,
} from '@flink-app/debug-plugin';
import { managementApiPlugin } from '@flink-app/management-api-plugin';

const debugManagementModule = GetDebugManagementModule({
  ui: true,
});

function start() {
  new FlinkApp<Ctx>({
    name: 'My flink app',
    debug: true,
    db: {
      uri: 'mongodb://localhost:27017/my-flink-app',
    },
    plugins: [
      debugPlugin({ enabledAtStart: false, logToConsole: false, keepLogs : 100 }),
      managementApiPlugin({
        token: '123',
        jwtSecret: '123',
        modules: [debugManagementModule],
      }),
    ],
  }).start();
}

start();

This way all static files in the src/public folder will be copied into dist.

0.7.0-alpha.1

3 months ago

0.7.0-alpha.0

10 months ago

0.5.0

1 year ago

0.5.2

1 year ago

0.6.0

1 year ago

0.4.7

1 year ago

0.4.5

1 year ago

0.4.6

1 year ago

0.4.4

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.12

1 year ago

0.4.2

1 year ago

0.3.11

1 year ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.3

2 years ago