{"id":19903880,"url":"https://github.com/zerotohero-dev/tunel","last_synced_at":"2025-10-14T21:05:15.898Z","repository":{"id":57382194,"uuid":"157309027","full_name":"zerotohero-dev/tunel","owner":"zerotohero-dev","description":"Tunel: Tunnels REST-like requests over IPC/Channels.","archived":false,"fork":false,"pushed_at":"2018-11-26T21:16:17.000Z","size":26,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T11:36:29.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zerotohero-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-13T02:36:37.000Z","updated_at":"2023-10-02T21:59:15.000Z","dependencies_parsed_at":"2022-09-13T11:30:46.509Z","dependency_job_id":null,"html_url":"https://github.com/zerotohero-dev/tunel","commit_stats":null,"previous_names":["jsbites/tunel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zerotohero-dev/tunel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerotohero-dev%2Ftunel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerotohero-dev%2Ftunel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerotohero-dev%2Ftunel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerotohero-dev%2Ftunel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zerotohero-dev","download_url":"https://codeload.github.com/zerotohero-dev/tunel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerotohero-dev%2Ftunel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279021238,"owners_count":26087017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-12T20:25:49.275Z","updated_at":"2025-10-14T21:05:15.883Z","avatar_url":"https://github.com/zerotohero-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"```text\n  ___                 /\n    _-_-  _/\\____    / __\\\\__\n _-_-__  / ,-. -|   /  -  ,-.`-.\n    _-_- `( o )--  /  --( o )-'\n           `-'    /      `-'\ntunel (n): RESTful message tunneling over IPC.\n```\n\n## Quick Example\n\nHere’s the code for Electron’s **main thread**:\n\n```javascript\n//\n// Main Thread\n//\n\nconst electron = require('electron');\nconst channel = electron.ipcMain;\n\nconst { app, registerChannel } = require('tunel/server');\n\nregisterChannel(channel);\n\n// `app` API is similar to `express.js`\napp.get('/api/v1/profile', async req =\u003e {\n  // You can access req.body, req.params…\n  void req;\n\n  // Unlike express, there is no `res` object.\n  // As soon as you return from the function, you’ll relay\n  // a response back.\n  // So, returning a JSON `json`, is similar to `res.send(json)`.\n  return {\n    userName: 'robert',\n    fullName: 'Robert Denir Ona'\n  };\n});\n```\n\nHere’s the cod for Electron’s **renderer thread** (_i.e., the browser_):\n\n```javascript\n//\n// Renderer Thread\n//\n\nimport request from 'tunel';\n\nconst doFetch = async () =\u003e {\n  // `request` API is similar to `axios`.\n  const response = await request({\n    method: 'GET',\n    url: '/api/v1/profile',\n    data: { some: 'payload' },\n    headers: {\n      'Content-Type': 'application/json'\n    }\n  });\n\n  // Will log\n  // `{ status: 200, data: { userName: 'robert',\n  // fullName: 'Robert Denir Ona' }}`\n  console.log(response);\n};\n\ndoFetch();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerotohero-dev%2Ftunel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerotohero-dev%2Ftunel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerotohero-dev%2Ftunel/lists"}