Skip to content

A simple way to enable realtime HTML applications, using Express.JS, Server-Sent-Events and MongoDB Watch Streams.

Notifications You must be signed in to change notification settings

NordicProgrammer/MongoWatchSSE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

MongoWatchSSE

A simple way to enable realtime HTML applications, using Express.JS, Server-Sent-Events and MongoDB Watch Streams. MongoWatchSSE provides a Express.JS Get handler for easy integration.

NPM Package Dependencies

Setup

To setup, just create a instance of MongoWatchSSE, then pass the stream.routerHandler to the router.get() callback.

Example

var express = require('express');
var router = express.Router();
var MongoWatchSSE = require("MongoWatchSSE")
var stream = new MongoWatchSSE({mongoDBCS: "mongodb://0.0.0.0:27017", collection: "test", db:"test"})
router.get('/events', stream.routerHandler);
module.exports = router;

About

A simple way to enable realtime HTML applications, using Express.JS, Server-Sent-Events and MongoDB Watch Streams.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published