This is a Websocket Middleware server for Cockpit Headless CMS.
You can use the following Javascript SDK to get real-time updates.
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
Edit each collection and add the following settings:
- Preview URL: The http url where you can see the changes.
- Websocket:
ws://localhost:4000/
npm install
npm start
npm start
You can easily deploy with Zeit Now
npm deploy