Feedback
Chat & Social

Hello World

This is only the beginning!
Back to BLOCKS

About Hello World

This is a simple “Hello World” BLOCK.
Replaces your message with { "hello" : "world" }

Try it Now
Categories:
Chat & Social Chat & Social
Bots & AI
Bots & AI
Chat & Social
Chat & Social
Triggers & Notifications
Triggers & Notifications
Last Updated:
20160831 at 14:56:00
Author:
Stephen Blum - CTO

Your First Event Handler

A simple hello world block which can replace your original message with { "hello" : "world" }.

This is done in an on-before publish/fire event handler.

Hello World

JavaScript. The basic BLOCK. One event handler.
export default request => {
    return request.ok({
        hello : "world"
    })
}

Workflow

Send/Receive messages on channel: "hello-world"
{
    "hello" : "world"
}

Try PubNub Today

Connect up to 100 devices for Free