Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import Syncano from '@syncano/core'
export default (ctx) => {
const {channel, response} = new Syncano(ctx)
const {args} = ctx
try {
channel.publish(`global-messages`, {'light': args.light, 'status': args.status})
.then(res => {response(JSON.stringify(res), 200, 'application/json')})
} catch(e) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment