brunnolou / Cockpit-Real-time-Server

A Websocket Middleware server for Cockpit Headless CMS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cockpit Real-time Server

This is a Websocket Middleware server for Cockpit Headless CMS.

You can use the following Javascript SDK to get real-time updates.

Cockpit Webhook

Add a Webhook to Cockpit with the following settings:

  • Url: http://localhost:4000/update

    Or the public address where the server is hosted

  • Events:

    You must add at least one event. e.g.:

    • collections.save.after
    • collections.save.after.portfolio
    • webhook screenshot

Preview collections

Edit each collection and add the following settings:

  • Preview URL: The http url where you can see the changes.
  • Websocket: ws://localhost:4000/
  • webhook screenshot

Installation

npm install

Start

npm start

Development

npm start

Deployment

You can easily deploy with Zeit Now

npm deploy

About

A Websocket Middleware server for Cockpit Headless CMS.

License:MIT License


Languages

Language:JavaScript 94.3%Language:HTML 5.7%