{"_id":"@acastellon/ws-dns","name":"@acastellon/ws-dns","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@acastellon/ws-dns","version":"1.1.0","description":"WS DNS system (Ad-hoc Discovery WS system)","main":"index.js","scripts":{"test":"echo \"no test\" && exit 0"},"repository":{"type":"git","url":"git+https://github.com/antonio-castellon/module-ws-dns.git"},"keywords":["dns","discovery","ws"],"author":{"name":"Antonio Castellon"},"license":"MIT","bugs":{"url":"https://github.com/antonio-castellon/module-ws-dns/issues"},"homepage":"https://github.com/antonio-castellon/module-ws-dns#readme","engines":{"node":">=18.0.0"},"_id":"@acastellon/ws-dns@1.1.0","gitHead":"02ddb135a03ef255f44d748c68f5d7091979213e","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-BQecJejEsdQdRxTeDWwGzgfL6PWNEvpwR64O1wcxEBx4XJc1HrgSfnV0KgmOk0cbxhwh7iuMeoxa2MIP3RG5nw==","shasum":"2aecf33b39f431f0abcd72630b1a4b2460d01885","tarball":"https://registry.npmjs.org/@acastellon/ws-dns/-/ws-dns-1.1.0.tgz","fileCount":4,"unpackedSize":4067,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFQuxo6dnkXuEtku1AV3d5LOSRMjwLqo83dXUjIw1ZT0AiBmVZesR+YDE0BfBFD27afDTRZW+HGv5wSY0xKCXJiBag=="}]},"_npmUser":{"name":"acastellon","email":"antonio@castellon.ch"},"directories":{},"maintainers":[{"name":"acastellon","email":"antonio@castellon.ch"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ws-dns_1.1.0_1780483682598_0.9446756126358444"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-03T10:48:02.414Z","1.1.0":"2026-06-03T10:48:02.735Z","modified":"2026-06-03T10:48:02.916Z"},"maintainers":[{"name":"acastellon","email":"antonio@castellon.ch"}],"description":"WS DNS system (Ad-hoc Discovery WS system)","homepage":"https://github.com/antonio-castellon/module-ws-dns#readme","keywords":["dns","discovery","ws"],"repository":{"type":"git","url":"git+https://github.com/antonio-castellon/module-ws-dns.git"},"author":{"name":"Antonio Castellon"},"bugs":{"url":"https://github.com/antonio-castellon/module-ws-dns/issues"},"license":"MIT","readme":"# @acastellon/ws-dns\r\n\r\nWS DNS system ( Ad-hoc Discovery WS system) - server side for service registration/discovery.\r\n\r\nThis module was incomplete/minimal in the original repo. It is the server counterpart to the `@acastellon/dns-client` module.\r\n\r\n## Intended API / Endpoints (implement these)\r\n\r\nTypical REST/WS endpoints a full implementation should expose (versioned):\r\n\r\n- `GET /:version/ping` → 200/201 if healthy\r\n- `GET /:version/get/:service_id` → returns { service: { PROTOCOL, IP_OR_CNAME, PORT, METHOD } } or error\r\n- `POST /:version/set/:service_id` with body { PROTOCOL, PORT, METHOD } → registers the service address\r\n\r\n**Example server skeleton (what you would implement):**\r\n\r\n```js\r\nconst express = require('express');\r\nconst app = express();\r\n\r\napp.use(express.json());\r\n\r\nconst services = {}; // or use a real store\r\n\r\napp.get('/:version/ping', (req, res) => res.sendStatus(200));\r\n\r\napp.get('/:version/get/:service_id', (req, res) => {\r\n  const svc = services[req.params.service_id];\r\n  if (svc) res.json({ service: svc });\r\n  else res.status(404).json({ error: 'not found' });\r\n});\r\n\r\napp.post('/:version/set/:service_id', (req, res) => {\r\n  services[req.params.service_id] = req.body;\r\n  res.sendStatus(201);\r\n});\r\n\r\napp.listen(7777, () => console.log('WS DNS server stub running'));\r\n```\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install @acastellon/ws-dns\r\n```\r\n\r\n## Current stub\r\n\r\nThe index.js exports a factory that returns a minimal object with `start`, `register`, `get`. Replace with real Express + storage.\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md","_rev":"1-6c9d97651fe33a088f3b05534104ef13"}