{"id":14989329,"url":"https://github.com/jhuntdev/blest-js","last_synced_at":"2026-02-07T22:31:57.472Z","repository":{"id":172022501,"uuid":"648741414","full_name":"jhuntdev/blest-js","owner":"jhuntdev","description":"The NodeJS reference implementation of BLEST (Batch-able, Lightweight, Encrypted State Transfer), an improved communication protocol for web APIs which leverages JSON, supports request batching by default, and provides a modern alternative to REST.","archived":false,"fork":false,"pushed_at":"2025-09-03T13:26:47.000Z","size":149,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-21T00:26:03.331Z","etag":null,"topics":["api","blest","client","connect","express","fastify","hapi","koa","nodejs","server"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhuntdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-02T17:35:35.000Z","updated_at":"2025-09-03T13:26:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b9416ec-58e5-4c7c-ab13-778da11dfa10","html_url":"https://github.com/jhuntdev/blest-js","commit_stats":{"total_commits":61,"total_committers":3,"mean_commits":"20.333333333333332","dds":"0.24590163934426235","last_synced_commit":"5bd5c810a10cb4f82d35bf4e81aa722d1f628ce0"},"previous_names":["jhuntdev/blest-js"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jhuntdev/blest-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuntdev%2Fblest-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuntdev%2Fblest-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuntdev%2Fblest-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuntdev%2Fblest-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhuntdev","download_url":"https://codeload.github.com/jhuntdev/blest-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuntdev%2Fblest-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29211127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T22:22:11.602Z","status":"ssl_error","status_checked_at":"2026-02-07T22:22:10.684Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","blest","client","connect","express","fastify","hapi","koa","nodejs","server"],"created_at":"2024-09-24T14:18:08.538Z","updated_at":"2026-02-07T22:31:57.457Z","avatar_url":"https://github.com/jhuntdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BLEST.js\n\nThe NodeJS reference implementation of BLEST (Batch-able, Lightweight, Encrypted State Transfer), an improved communication protocol for web APIs which leverages JSON, supports request batching by default, and provides a modern alternative to REST. It includes examples for Connect, Express, Fastify, Hapi, and Koa.\n\nTo learn more about BLEST, please visit the website: https://blest.jhunt.dev\n\nFor a front-end implementation in React, please visit https://github.com/jhuntdev/blest-react\n\n## Features\n\n- Built on JSON - Reduce parsing time and overhead\n- Request Batching - Save bandwidth and reduce load times\n- Compact Payloads - Save even more bandwidth\n- Single Endpoint - Reduce complexity and facilitate introspection\n- Fully Encrypted - Improve data privacy\n\n## Installation\n\nInstall BLEST.js from npm\n\nWith npm:\n```bash\nnpm install --save blest-js\n```\nor using yarn:\n```bash\nyarn add blest-js\n```\n\n## Usage\n\n### Router\n\nThis example uses Express, but you can find examples with other frameworks [here](examples).\n\n```javascript\nconst express = require('express');\nconst { Router } = require('blest-js');\n\nconst app = express();\nconst port = 8080;\n\n// Create some middleware (optional)\nconst loggingMiddleware = async (params, context, next) =\u003e {\n  const startTime = Date.now()\n  await next()\n  const endTime = Date.now()\n  console.log(context.route, endTime - startTime)\n};\n\n// Create a route controller\nconst greetController = (params, context) =\u003e {\n  return {\n    greeting: `Hi, ${params.name}!`\n  };\n};\n\n// Create a BLEST router\nconst router = new Router({ timeout: 1000 });\nrouter.route('greet', loggingMiddleware, greetController);\n\n// Parse the JSON body\napp.use(express.json());\n\n// Use the request handler\napp.post('/', async (req, res, next) =\u003e {\n  const [result, error] = await router.handle(req.body);\n  if (error) {\n    return next(error);\n  } else {\n    res.json(result);\n  }\n});\n\n// Listen for requests\napp.listen(port, () =\u003e {\n  console.log(`Server listening on port ${port}`);\n});\n```\n\n### HttpClient\n\n```javascript\nconst { HttpClient } = require('blest-js');\n\n// Create a client\nconst client = new HttpClient('http://localhost:8080', {\n  maxBatchSize: 25,\n  bufferDelay: 10,\n  httpHeaders: {\n    // ...\n  }\n});\n\n// Send a request\nclient.request('greet', { name: 'Steve' })\n.then((result) =\u003e {\n  // Do something with the result\n})\n.catch((error) =\u003e {\n  // Do something in case of error\n});\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhuntdev%2Fblest-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhuntdev%2Fblest-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhuntdev%2Fblest-js/lists"}