0.9.953 • Published 8 months ago

spoojs v0.9.953

Weekly downloads
57
License
MIT
Repository
github
Last release
8 months ago

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
0.9.953

8 months ago

0.9.951

11 months ago

0.9.952

9 months ago

0.9.947

1 year ago

0.9.948

1 year ago

0.9.949

1 year ago

0.9.950

1 year ago

0.9.946

2 years ago

0.9.944

2 years ago

0.9.945

2 years ago

0.9.942

2 years ago

0.9.943

2 years ago

0.9.940

2 years ago

0.9.941

2 years ago

0.9.939

2 years ago

0.9.935

2 years ago

0.9.936

2 years ago

0.9.937

2 years ago

0.9.938

2 years ago

0.9.931

2 years ago

0.9.932

2 years ago

0.9.933

2 years ago

0.9.934

2 years ago

0.9.930

2 years ago

0.9.928

3 years ago

0.9.929

3 years ago

0.9.925

3 years ago

0.9.926

3 years ago

0.9.927

3 years ago

0.9.924

3 years ago

0.9.923

3 years ago

0.9.921

3 years ago

0.9.922

3 years ago

0.9.920

3 years ago

0.9.917

3 years ago

0.9.918

3 years ago

0.9.919

3 years ago

0.9.916

3 years ago

0.9.90

3 years ago

0.9.91

3 years ago

0.9.913

3 years ago

0.9.914

3 years ago

0.9.915

3 years ago

0.9.911

3 years ago

0.9.912

3 years ago

0.9.88

3 years ago

0.9.87

3 years ago

0.9.85

3 years ago

0.9.86

3 years ago

0.9.84

3 years ago

0.9.83

3 years ago

0.9.79

3 years ago

0.9.81

3 years ago

0.9.82

3 years ago

0.9.80

3 years ago

0.9.78

3 years ago

0.9.77

3 years ago

0.9.76

3 years ago

0.9.75

3 years ago

0.9.74

3 years ago

0.9.73

3 years ago

0.9.72

3 years ago

0.9.70

3 years ago

0.9.71

3 years ago

0.9.67

3 years ago

0.9.68

3 years ago

0.9.69

3 years ago

0.9.64

3 years ago

0.9.65

3 years ago

0.9.66

3 years ago

0.9.63

3 years ago

0.9.61

3 years ago

0.9.62

3 years ago

0.9.60

4 years ago

0.9.59

4 years ago

0.9.58

4 years ago

0.9.57

4 years ago

0.9.56

4 years ago

0.9.55

4 years ago

0.9.54

4 years ago

0.9.53

4 years ago

0.9.52

4 years ago

0.9.51

4 years ago

0.9.50

4 years ago

0.9.49

4 years ago

0.9.46

4 years ago

0.9.47

4 years ago

0.9.48

4 years ago

0.9.45

4 years ago