sse-mock
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

sse-mock

Prerequisites

  1. Node.js LTS

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
});

Readme

Keywords

Package Sidebar

Install

npm i sse-mock

Weekly Downloads

3

Version

1.1.4

License

ISC

Unpacked Size

5.82 kB

Total Files

4

Last publish

Collaborators

  • net900621