JSPM

  • Created
  • Published
  • Downloads 37
  • Score
    100M100P100Q60282F
  • License MIT

Datastore for JSON compatible with Smart Spaces. We believe in an open Internet of Things.

Package Exports

  • json-silo

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (json-silo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

json-silo

A data silo for JSON compatible with Smart Spaces

json-silo is a datastore for JSON objects that are compatible with smartspaces.

Installation

npm install json-silo

Hello JSON Silo

var server = require('json-silo');
var app = new server();

Then browse to http://localhost:3002 to see the landing page.

Browse to http://localhost:3002/id/test) to see the following test output:

{
  person: {
    firstName: "Barn",
    lastName: "Owl",
    companyName: "reelyActive"
  }
}

Querying the JSON Silo

To query the JSON stored under the identifier 1a2b3c4d5e6f make the following request:

To query the real-time context of a place named thebarn make the following request (see hlc-server for the output format):

Options

The following options are supported when instantiating json-silo (those shown are the defaults):

{
  httpPort: 3002,
  useCors: false,
  hlcServerUrl: "http://localhost:3001",
  smartspacesUrl: "http://localhost:3000"
}

What's next?

This is an active work in progress. Expect regular changes and updates, as well as improved documentation!

License

MIT License

Copyright (c) 2014 reelyActive

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.