Skip to content

Installation

badosa edited this page Aug 6, 2013 · 16 revisions

WikiInstallation

Download the latest version of json-stat.js.

Then include a link in your webpage to your copy of the json-stat.js file:

<script src="/your-js-dir/json-stat.js"></script>

You can also download the full repository with tests.

Warning: When developing locally, your browser may enforce strict permissions for reading files out of the local file system. If you use JSONstat with a URI string that points to a local file, you will need to set up a local web server first. When passing a URI string, take also into account that JSONstat has limited old browsers support. Whenever you can, use an object instead.

The JSON-stat Javascript Toolkit can also be run on the server as a Node.js module. Type the following command to install:

npm install jsonstat

This module has all the functionality of the client version except the connection capabilities (you need to pass a JSON-stat response object, you cannot pass a URI string).

Clone this wiki locally