Connect middleware that simulates the SharePoint 2010 RESTful interface.
- Install the module with:
npm install sp2010-rest
- Create a static
.json
file with a sample REST output the list you'd like to emulate. - Pass
sp2010-rest
into an Express server as middleware, telling it where to find those.json
files.
var connect = require('connect');
var sp2010rest = require('sp2010-rest');
var app = connect()
.use(sp2010rest(connect, 'lists')) // prioritise REST emulation above your other routes
.use(connect.static('public'))
.listen(3000);
Here's a gist showing how you might use sp2010-rest with Grunt in a Yeoman project.
Copyright (c) 2013 Kevin Attfield. Licensed under the MIT license.