rbxwebhook.js
Simple event communication between Roblox servers and Node.js
Originally created by Reselim but was deprecated.
Installation
Server
npm install --save rbxwebhook.js
Client
Put the contents of client.lua inside of a ModuleScript.
Example
Server
Main Script
// MainScriptvar express = var app = ; app app; app;
Router File
var longPolling = ;var server = ; server; moduleexports = serverrouter;
Client
local Connection = require(script.Connection)local client = Connection.new() client:connect("127.0.0.1:3000/rbxwebhook") client:on("pong", function(message) print("echoed from server: ", message)end) client:on("broadcast", function(message) print("broadcast: ", message)end) client:send("ping", "Hello world!") game:BindToClose(function() client:disconnect()end)
apiKeys
We now accept apiKeys! It is very simple to implent. All you need to do is add the apiKey option inside of the class you are creatings paremeters.
Example
Server:
const rbxwebhook = ;const server = apiKey: "YOURKEYHERE";
Client:
local rbxwebhook = require(game:GetService("ServerScriptService"):WaitForChild("rbxwebhook"));local client = rbxwebhook.new( { apiKey = "YOURKEYHERE" } );