I think using a Web PubSub instance would be a better fit. It encapsulates SignalR service into a simplified publisher/receiver model. This tutorial walks you through creating a simple publisher and subscriber app.
// * publisher * //
const { WebPubSubServiceClient } = require('@azure/web-pubsub');
const hub = "pubsub";
let service = new WebPubSubServiceClient(process.env.WebPubSubConnectionString, hub);
// by default it uses `application/json`, specify contentType as `text/plain` if you want plain-text
service.sendToAll(process.argv[2], { contentType: "text/plain" });
// * subscriber * //
const WebSocket = require('ws');
const { WebPubSubServiceClient } = require('@azure/web-pubsub');
async function main() {
const hub = "pubsub";
let service = new WebPubSubServiceClient(process.env.WebPubSubConnectionString, hub);
let token = await service.getClientAccessToken();
let ws = new WebSocket(token.url);
ws.on('open', () => console.log('connected'));
ws.on('message', data => console.log('Message received: %s', data));
}
main();
Your publisher can be an Azure Function that's either triggered through HTTP, Timer, or a Queue and use a webPubSub as an output to broadcast and any connected subscriber will receive the message. This serverless notification tutorial demonstrates how to set this up. Your subscriber should be able to run headless but using node, you would still need to run it locally.