{"id":41270,"library":"hyco-https","title":"hyco-https (Azure Relay Hybrid Connections for Node.js HTTPS)","description":"Version 1.4.5 of the hyco-https package for Azure Relay Hybrid Connections extends Node's built-in 'https' module to accept HTTPS requests via Azure Relay public endpoints. It re-exports all core https exports and adds server-side hybrid connection integration, allowing applications residing anywhere to receive HTTPS requests. The server behavior is completely overridden (cannot coexist with local https listening). Client functionality is unchanged. For frameworks like Express, explicit 'http' and 'hyco-https' requires are needed before loading the framework. Helper methods like createRelayListenUri and createRelayHttpsUri simplify URI creation with embedded tokens. Release cadence is infrequent (last update 2020). Differentiator: seamlessly replaces Node's https for hybrid cloud connectivity.","status":"active","version":"1.4.5","language":"javascript","source_language":"en","source_url":"https://github.com/Azure/azure-relay-node","tags":["javascript","https"],"install":[{"cmd":"npm install hyco-https","lang":"bash","label":"npm"},{"cmd":"yarn add hyco-https","lang":"bash","label":"yarn"},{"cmd":"pnpm add hyco-https","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"hyco-https is a CommonJS module; ESM import syntax is not supported. Use require.","wrong":"import hycoHttps from 'hyco-https';","symbol":"default","correct":"const hycoHttps = require('hyco-https');"},{"note":"createServer is a method on the default export object, not a named export.","wrong":"const { createServer } = require('hyco-https');","symbol":"createServer","correct":"const https = require('hyco-https'); const server = https.createServer((req, res) => { ... });"},{"note":"createRelayListenUri is a static method on the default export object.","wrong":"const { createRelayListenUri } = require('hyco-https');","symbol":"createRelayListenUri","correct":"const https = require('hyco-https'); const uri = https.createRelayListenUri(namespace, path);"},{"note":"Required for Express compatibility: set http.ServerResponse = https.ServerResponse before loading Express.","wrong":"const { ServerResponse } = require('hyco-https');","symbol":"ServerResponse","correct":"const https = require('hyco-https'); const ServerResponse = https.ServerResponse;"}],"quickstart":{"code":"const https = require('hyco-https');\nconst listenUri = https.createRelayListenUri(\n  process.env.RELAY_NAMESPACE || 'your-namespace.servicebus.windows.net',\n  process.env.RELAY_PATH || 'hyco'\n);\nconst token = https.appendRelayToken(listenUri,\n  process.env.RELAY_RULE_NAME || 'listener',\n  process.env.RELAY_KEY || ''\n);\nconst server = https.createRelayedServer(\n  { server: token },\n  (req, res) => {\n    res.writeHead(200, { 'Content-Type': 'text/plain' });\n    res.end('Hello from Azure Relay Hybrid Connections!\\n');\n  }\n);\nserver.listen((err) => {\n  if (err) {\n    return console.log('Error:', err);\n  }\n  console.log(`Server listening on ${token}`);\n});","lang":"javascript","description":"Creates a Relay listener URI, appends a token, and starts an HTTPS server through Azure Relay Hybrid Connection."},"warnings":[{"fix":"If you need local https, use a separate process or use only hyco-https for remote listening.","message":"Cannot use hyco-https and Node's built-in https simultaneously in the same process; server behavior is overridden entirely.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"var http = require('http'); var https = require('hyco-https'); http.ServerResponse = https.ServerResponse; var express = require('express');","message":"Express and other frameworks that override http.ServerResponse require manual assignment of https.ServerResponse before loading the framework.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use createRelayedServer(options, requestListener) where options includes the 'server' URI with token.","message":"In hyco-https, createServer does not support the full standard https.createServer options; use createRelayedServer instead.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use @azure/arm-relay SDK for token management if possible.","message":"The appendRelayToken helper returns a URI with embedded token; consider using Azure SDK policies instead of token manipulation.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.4.5':12 '2020':116 'accept':33 'add':50 'allow':57 'anywher':60 'applic':58 'azur':4,20,37 'behavior':67 'built':28 'built-in':27 'cadenc':111 'cannot':71 'client':77 'cloud':125 'coexist':72 'complet':69 'connect':7,23,55,126 'core':46 'createrelayhttpsuri':103 'createrelaylistenuri':101 'creation':106 'differenti':117 'embed':108 'endpoint':40 'explicit':85 'export':44,48 'express':84 'extend':24 'framework':82,97 'function':78 'helper':98 'http':86 'https':3,10,17,30,34,47,63,75,90,122,128 'hybrid':6,22,54,124 'hyco':2,16,89 'hyco-http':1,15,88 'infrequ':113 'integr':56 'javascript':127 'last':114 'like':83,100 'listen':76 'load':95 'local':74 'method':99 'modul':31 'need':93 'node':25,120 'node.js':9 'overridden':70 'packag':18 'public':39 're':43 're-export':42 'receiv':62 'relay':5,21,38 'releas':110 'replac':119 'request':35,64 'requir':91 'resid':59 'seamless':118 'server':52,66 'server-sid':51 'side':53 'simplifi':104 'token':109 'unchang':80 'updat':115 'uri':105 'version':11 'via':36","created_at":"2026-06-04T18:51:35.748143+00:00","updated_at":"2026-06-04T18:51:35.748143+00:00","problems":[{"fix":"Remove port number from server.listen() and pass only a callback. hyco-https creates a WebSocket listener, not a TCP socket.","cause":"Trying to listen on a local port while hyco-https is designed for remote relay; local port binding is not supported for relayed servers.","error":"Error: listen EADDRINUSE :::443"},{"fix":"Use const hycoHttp = require('hyco-https');","cause":"Using ES module import (import hycoHttps from 'hyco-https') instead of CommonJS require.","error":"TypeError: https.createServer is not a function"},{"fix":"Switch to CommonJS (remove type: module) or use createRequire from 'module'.","cause":"Running in ES module context (type: module in package.json).","error":"ReferenceError: require is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://docs.microsoft.com/en-us/azure/service-bus-relay/","github":"https://github.com/Azure/azure-relay-node","docs":null,"changelog":null,"pypi":null,"npm":"hyco-https","openapi_spec":null,"status_page":null,"smithery":null,"categories":["communication"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}