mementoweb

0.0.1 • Public • Published

Mementoweb.js

This is an express 4.X routing plugin to easily add Memento Datetime versioning to your application. It is an implementation of RFC7098.

Install mementoweb.js via npm

npm install mementoweb

Create a simple application by specifying which Datetime Negotiation pattern you want to use (2.1 is default).

var express = require('express'), 
	memento = require('mementoweb');

var app = express();

var memento = memento(app,{pattern:21});

Create routes as with any other express application

app.get('/hello', function(req, res){
	res.send('Hello World');
});

var server = app.listen(3000, function() {
	console.log('Listening on port %d', server.address().port);
});

The resources /hello?memento=timegate, /hello?memento=timemap, /hello?memento={version} will be automatically available, together with the required hypermedia.

/mementoweb/

    Package Sidebar

    Install

    npm i mementoweb

    Weekly Downloads

    1

    Version

    0.0.1

    License

    none

    Last publish

    Collaborators

    • miel_vds