(H)ttp (E)vent (E)mitter
(H)ttp (E)vent (E)mitter
Installing
npm i hee
Example
Client (client.html)
Server (server.mjs)
const hee = 8080 hee hee
Run
node --experimental-modules server.mjs
Hee is using experimental ECMAScript modules https://nodejs.org/api/esm.html
API
const hee = PORT
Events
hee
Emitted when a new client GET a path to listen.
hee
Emitted when a client POST to a path.
Params:
path: '/namespace/id/1' id: 'ad5a71fc-abc7-4d92-a585-d56934047ce9' data: payload: 'Hello World'