CoCreateJS

Learn how to convert your html into a dynamic realtime application.

CRUD Objects

Simple objects you can use to create custom components.

Create Document Parameters

  • namespace string optional

    create namespace

  • rooms string optional

    creates room

  • broadcast boolean optional

    broadcast or only save to db

  • array string required

    array to save to

  • object array object optional

    data to save

  • metaData string array object optional

    Additonal data in the form of a string , array or object

  
  crud.createDocument({
    array: "string",
    object: {
      name1: "hello"
      name2: "hello1"
    }
  })
  
						

Read Document Parameters

Update Document Parameters

Delete Document Parameters

Read Document Filter Parameters

CRDT Objects

Conflict resolving objects to create collaborative apps.

Init CRDT Parameters

  • namespace string optional

    create namespace

  • rooms string optional

    creates room

  • broadcast boolean optional

    broadcast or only save to db

  • array string required

    array to save to

  • data object optional

    data to save

  • metaData string array object optional

    Additonal data in the form of a string , array or object

  
  crdt.init({
    array: "module",
    object: "",
    name: ""
  })
  
						

Get Data CRDT Parameters

Update Data CRDT Parameters

Replace Data CRDT Parameters

WebSocket Objects

Send and listen to messages

Create Socket Parameters

  • array string required

    array to save to

  • object string required

    Document _id to save to

  • name string required

    Save data onChange. If attribute is empty or not used Default's to true.

  • start string optional

    Save data onChange/submitBtn. If attribute is empty or not used Default's to true.

  • end string array object optional

    Additonal data in the form of a string , array or object

  
  socket.create({
    namespace: '',
    rooms: [r1, r2],
  })
  
						

Send Message Parameters

Listen Message Parameters