0.0.3 • Published 12 years ago
jsonp-filter v0.0.3
jsonp-filter
jsonp filter for the express framework.
Introduction
The purpose of jsonp-filter is to provide an option to serve the response as jsonp (callback with string input).
Installing
Just grab node.js and npm and you're set:
npm install jsonp-filter
Note that jsonp-filter was developed using CoffeeScript.
Using
To utilize jsonp-filter, simply require it and then have the express server use the setupJSONP() method. To make sure that no other modules conflict with jsonp-filter, it should be used by the server before other 'use' methods.
jsonp = require 'jsonp-filter'
server.use jsonp.setupJSONP()
After jsonp-filter has been setup, responses can now be served as jsonp by specifying json=true&callback=callbackname as query string parameters.
Outstanding Issues
- none at this time
Created by
- Stephen Veerman