dashboard-rotator

0.1.0 • Public • Published

dashboard-rotator

Provides a simple two-argument method for generating an HTML page which cycles through N URLs at a given interval.

The method being used to construct the page (crude string replace) is ugly - but, the intention here is to achieve a dashboard rotator with as little effort as possible. Specifically it has been written so that:

  • It does not require any specific web framework or server
  • It requires no AJAX calls on the client side
  • The response generated can be written out by any framework capable of writing strings into the response data

Example

var rotator = require("dashboard-rotator")

// Returns the string of the static page require to rotate through the given URLs
// ...
response.write( rotator(["http://example.com"], 30000) );
//...

Package Sidebar

Install

npm i dashboard-rotator

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • d_w_roberts