New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

spoojs

Package Overview
Dependencies
Maintainers
0
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spoojs

A JavaScript framework to build multi purpose platforms

latest
Source
npmnpm
Version
0.9.960
Version published
Weekly downloads
5
Maintainers
0
Weekly downloads
 
Created
Source

SPOO - Build a platform

SPOO (Single Point of Object) is a JavaScript framework for creating custom platforms using OBJY.

Platform

For the official Documentation, visit spoo.io/docs

SPOO is built on OBJY.

OBJY

For running a basic platform you will need Node.js, Redis and MongoDB

Spin up a Platform

npm i spoojs objy
// 1. import spoo
const SPOO = require('spoojs');
const OBJY = require('objy');

// 2. define some "object wrappers"
OBJY.define({
  name: "user",
  pluralName: "users",
  authable: true
})

OBJY.define({
  name: "object",
  pluralName: "objects"
})

// 3. run the platform via REST
SPOO.REST({
  port:80,
  OBJY,
  metaMapper: new SPOO.metaMappers.mongoMapper().connect("mongodb://localhost") // The matamapper is for basic config
}).run()

Set up a Client (SDK)

Install via npm or script tag:

<script src="spoo.js">

or

npm i spoo-client
// 1. Initialize the client
const spoo = new SPOO_Client('mytenant');

// 2. Authenticate a user
spoo.io().auth("user", "pass", function(data, err){
  if(!err) console.log('you are in!');
})

// Add an object
spoo.io().object({
  name: "Mercedes",
  type: "car",
  properties: {
    owner : {
      type: "shortText",
      value: "Peter Griffin"
    }
  }
}).add(function(data, err)
{
  if(err) return console.error(err);
  console.log(data); // {...object...}
})

// Modify an object
spoo.io().object("objectid...").addProperty({
  color: {
    type: "shortText",
    value: "red"
  }
}).save(function(data, err)
{
  if(err) return console.error(err);
  console.log(data); // {...updated object...}
})

Authors

  • Marco Boelling - Initial work - Twitter

License

SPOO is open source and licensed under the GNU Affero General Public License. See LICENSE for more details.

Contribute

If you'd like to contribute to the source code, you are welcome to open a PR. Please make sure to read the CODE OF CONDUCT.

Further reading

  • For more information on SPOO, go to spoo.io

Keywords

platform

FAQs

Package last updated on 27 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts