seesaw 
a quick-setup springboard server working around client-side cross-domain requests
How to install
$ npm install seesaw
Using as Express middleware
var seesaw = require('seesaw').redirect;
// incert before custom routers
app.use('/someDir',seesaw('http://abc.com/apis')) // the base url you wanna mock
Use CLI
(now building...)
$ sudo npm install seesaw -g
$ swwsaw -r http://abc.com/apis -p 9999 // mock http://abc.com/apis running on port[9999]
Using as single springboard server
var Seesaw = ; // init a server instancevar server = 'http://abc.com/apis'; // the base url you wanna mock // start severserver;
How to seesaw ?
make sure your client-side scripts work like this:
// jQuery Demo:// this request will be redirected by seesaw server to URL http://abc.com/apis/user/1234567$;
Features
- quick setup
- develeoper friendly
- express middleware supported
Pull Request Welcome !
- fork this repo
- feel free to add your feature
- make sure your feature are fully tested!
- send me a PR, and enjoy !