Skip to content

net900621/sse-mock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

sse mock server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published