REST and Websocket plugin for harcon that automatically exposes service entities through REST and Websocket interfaces. Version 9.2.40 requires Node >= 8.0.0. Extends the harcon microservice framework with automatic RESTful/JSON-RPC/Websocket endpoints based on entity metadata. Uses fastify internally for HTTP/WS. Release cadence irregular; maintained by imrefazekas.
npm install harcon-radiationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Server instance with harcon and radiation, then registers an entity with rest and websocket flags to expose its services.
Use async/await or use harcon-radiation v7.x for callbacks.
Use JSON-RPC option (option 2) or Harcon RPC (option 3).
Use require('harcon-radiation/util/Server') instead of require('harcon-radiation').Ensure your entity object has rest: true and/or websocket: true.
Add await before server.init().
Verify package is installed: npm install harcon-radiation. Then use require('harcon-radiation/util/Server').Ensure Server is imported correctly and call await server.init() in an async function.
Ensure entity.services contains functions as values, not objects or strings.