The Spyne Console Plugin is a customizable UI component for development that displays all channel actions and payloads in real time. It’s primarily intended for use in development mode to inspect application behavior and debug reactive flow within SpyneJS applications.
npm install spyne-plugin-console
Import and register the plugin inside your application:
import { SpynePluginConsole } from 'spyne-plugin-console';
SpyneApp.registerPlugin(
new SpynePluginConsole({
position: ['bottom', 'right'], // corner of the screen
minimize: false, // expands or collapses on page load
})
);
-
position
: Defines the corner where the console appears.
Accepts combinations like['bottom', 'right']
or['top', 'left']
. -
minimize
: Iftrue
, the console starts minimized on page load.
To avoid including the console in production builds, register it conditionally:
if (process.env.NODE_ENV === 'development') {
import('./dev-tools.js');
}
Then inside dev-tools.js
:
import { SpynePluginConsole } from 'spyne-plugin-console';
SpyneApp.registerPlugin(
new SpynePluginConsole({
position: ['bottom', 'right'],
minimize: true,
})
);