1.1.4 • Published 10 months ago
sse-mock v1.1.4
sse-mock
Prerequisites
Get Started
npm install ssr-mock
add the package in webpack's plugins
sse
import WebpackSsePlugin from 'sse-mock';
...
const webpackSsePlugin = new WebpackSsePlugin({
port: 8844, // sse server port
time: 4000, // mock rotation interval
data: 'hhh', // mock data
});
ssr
const webpackSsePlugin = new WebpackWsPlugin({
port: 8088, // sse server port
time: 4000, // mock rotation interval, not required
data: ['xxxx', 'yyyy', 'zzzz'], // mock data list, will return random item once
});