Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update readme, license, and package.json

  • Loading branch information...
commit d43b2a3741f9312f54221334fdc090cf413d6e98 1 parent 4f6ba48
Steve Veerman authored

Showing 3 changed files with 55 additions and 2 deletions. Show diff stats Hide diff stats

  1. +21 0 LICENSE
  2. +32 0 README
  3. +2 2 package.json
21 LICENSE
... ... @@ -0,0 +1,21 @@
  1 +(The MIT License)
  2 +
  3 +Copyright (c) 2011 Postmedia Network Inc.
  4 +
  5 +Permission is hereby granted, free of charge, to any person obtaining a copy
  6 +of this software and associated documentation files (the "Software"), to deal
  7 +in the Software without restriction, including without limitation the rights
  8 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9 +copies of the Software, and to permit persons to whom the Software is
  10 +furnished to do so, subject to the following conditions:
  11 +
  12 +The above copyright notice and this permission notice shall be included in
  13 +all copies or substantial portions of the Software.
  14 +
  15 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21 +THE SOFTWARE.
32 README
... ... @@ -0,0 +1,32 @@
  1 +# jsonp-filter
  2 +jsonp filter for the express framework.
  3 +
  4 +## Introduction
  5 +
  6 +The purpose of jsonp-filter is to provide an option to serve the response as jsonp (callback with string input).
  7 +
  8 +## Installing
  9 +
  10 +Just grab [node.js](http://nodejs.org/#download) and [npm](http://github.com/isaacs/npm) and you're set:
  11 +
  12 + npm install jsonp-filter
  13 +
  14 +Note that jsonp-filter was developed using [CoffeeScript](http://coffeescript.org).
  15 +
  16 +## Using
  17 +
  18 +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.
  19 +
  20 + jsonp = require 'jsonp-filter'
  21 +
  22 + server.use jsonp.setupJSONP()
  23 +
  24 +After jsonp-filter has been setup, responses can now be served as jsonp by specifying json=true&callback=callbackname as query string parameters.
  25 +
  26 +## Outstanding Issues
  27 +
  28 +* none at this time
  29 +
  30 +## Created by
  31 +
  32 +* Stephen Veerman
4 package.json
@@ -11,8 +11,8 @@
11 11 "licenses": [
12 12 { "type": "MIT", "url": "https://github.com/Postmedia/connect-esi/blob/master/LICENSE"}
13 13 ],
14   - "keywords": ["coffeescript", "connect", "json", "jsonp"],
15   - "repository": "git://github.com/Postmedia/connect-esi",
  14 + "keywords": ["coffeescript", "express", "json", "jsonp"],
  15 + "repository": "git://github.com/Postmedia/jsonp-filter",
16 16 "main": "./lib/jsonp-filter",
17 17 "scripts": {
18 18 "build": "cake build"

0 comments on commit d43b2a3

Please sign in to comment.
Something went wrong with that request. Please try again.