{"id":23507506,"url":"https://github.com/bacher/rpc-json","last_synced_at":"2026-04-12T22:42:45.181Z","repository":{"id":65472311,"uuid":"79849037","full_name":"bacher/rpc-json","owner":"bacher","description":"RPC-JSON","archived":false,"fork":false,"pushed_at":"2018-03-19T10:53:37.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T14:49:46.934Z","etag":null,"topics":["nodejs","rpc"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bacher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-23T21:17:09.000Z","updated_at":"2018-03-19T10:53:38.000Z","dependencies_parsed_at":"2023-01-25T01:45:18.884Z","dependency_job_id":null,"html_url":"https://github.com/bacher/rpc-json","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bacher/rpc-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacher%2Frpc-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacher%2Frpc-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacher%2Frpc-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacher%2Frpc-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bacher","download_url":"https://codeload.github.com/bacher/rpc-json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacher%2Frpc-json/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265729367,"owners_count":23818744,"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","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":["nodejs","rpc"],"created_at":"2024-12-25T10:19:57.499Z","updated_at":"2026-04-12T22:42:40.156Z","avatar_url":"https://github.com/bacher.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"JSON Transport Protocol\n\nServer Example\n```javascript\nconst RequestServer = require('rpc-easy/RequestServer');\n\nconst server = new RequestServer((apiName, data) =\u003e {\n    return new Promise(resolve =\u003e {\n        console.log(`Api call ${apiName}, data:`, data);\n        setTimeout(() =\u003e {\n            console.log(`RESP ${data.lol}`);\n            resolve('OK');\n        }, 5000);\n    });\n});\n\nserver.listen({\n    host: 'localhost',\n    port: 10101\n}, err =\u003e {\n    if (err) {\n        console.log('Listen Error:', err);\n        return;\n    }\n\n    console.log('Listen 10101');\n});\n\nserver.on('error', err =\u003e {\n    console.log('Server Error:', err)\n});\n```\n\nClient Example\n```javascript\nconst Client = require('rpc-easy/Client');\n\nconst client = new Client({\n    port:          10101,\n    autoReconnect: true,\n    useQueue:      true,\n});\n\nclient.connect();\n\nlet i = 0;\n\nsetInterval(() =\u003e {\n    const curLol = ++i;\n\n    console.log(`Request #${curLol}`);\n\n    client.request('hello', { lol: curLol }).then(data =\u003e {\n        console.log(`Response #${curLol}:`, data);\n    }, err =\u003e {\n        console.log(`Error ${curLol}`, err);\n    });\n}, 1000);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbacher%2Frpc-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbacher%2Frpc-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbacher%2Frpc-json/lists"}