Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bespoke-sync

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bespoke-sync

Cross-client synchronization for Bespoke.js presentations

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

bespoke-sync

Cross-client synchronization for Bespoke.js presentations

Setup with Server Sent Events (for Server -> Client communication) and plain XMLHttpRequests (for Client -> Server communication).

Can be used to setup two screens (e.g. one for audience one for presenter) in sync:
Audience screen:                            Your screen:

Above demo uses bespoke-notes plugin to display notes on presenter's laptop screen

Usage

Server

Use returned middleware as in example below. You can use it directly in your server handler, or handle it with Connect

var bespokeSyncMiddleware = require('bespoke-sync/server')({
  // Options (all optional, with defaults as below)
  log: false,
  ssePath: '/sse-slides/',
  xhrPath: '/slide/'
});

createServer(function (req, res) {
	bespokeSyncMiddleware(req, res, function () {
	  // Request not handled by Bespoke, handle below
	  // ...
	});
});
Client (browser)
var sync = require('bespoke-sync/client');

bespoke.from(selector, [
	// Options (all optional, with defaults as below)
  sync({
    log: false,
    ssePath: '/sse-slides/', // Must match ssePath in server conf
    xhrPath: '/slide/' // Must match xhrPath in server conf
  })
]);

Installation

npm

In your presentation path:

$ npm install bespoke-sync

Keywords

FAQs

Package last updated on 11 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc