{"id":43727896,"url":"https://github.com/flatmax/lit-jrpc-swig","last_synced_at":"2026-02-05T09:13:28.544Z","repository":{"id":58912364,"uuid":"534508235","full_name":"flatmax/lit-jrpc-swig","owner":"flatmax","description":"Microapp to connect Lit and node to c++ with swig and jrpc-oo. This is a microapp starter.","archived":false,"fork":false,"pushed_at":"2022-10-26T02:55:11.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-10T16:28:21.991Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flatmax.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}},"created_at":"2022-09-09T05:19:02.000Z","updated_at":"2023-01-12T05:50:40.000Z","dependencies_parsed_at":"2022-09-12T00:50:33.221Z","dependency_job_id":null,"html_url":"https://github.com/flatmax/lit-jrpc-swig","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flatmax/lit-jrpc-swig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatmax%2Flit-jrpc-swig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatmax%2Flit-jrpc-swig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatmax%2Flit-jrpc-swig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatmax%2Flit-jrpc-swig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flatmax","download_url":"https://codeload.github.com/flatmax/lit-jrpc-swig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatmax%2Flit-jrpc-swig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29117921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T05:31:32.482Z","status":"ssl_error","status_checked_at":"2026-02-05T05:31:29.075Z","response_time":65,"last_error":"SSL_read: 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":[],"created_at":"2026-02-05T09:13:27.933Z","updated_at":"2026-02-05T09:13:28.530Z","avatar_url":"https://github.com/flatmax.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lit-jrpc-swig : lit-jrpc to jrpc-node to node-C++\n\nBasic microapp infrastructure for Lit web components which interface other web-components or nodejs using [jrpc-oo](https://github.com/flatmax/jrpc-oo).\n\nIn this microapp, lit eventually interfaces C++ over the network through jrpc then locally from js to C++ using swig.\n\nThis infrastructure can be easily cloned and updated for your own microapp which allows you to call objects using JRPC2 over the network between browsers, node or both.\n\n# Local Demo with nodjes and `web-dev-server`\n\nFirst compile the C++ with swig. Then setup the network and run.\n\n## compile C++\n\nFollow the [README.md](https://github.com/flatmax/lit-jrpc-swig/blob/master/C%2B%2B/README.md) in C++\n```\ncd C++\n./autogen.sh\n./configure\nmake\n# test if you like\ncd test\n./RunTest.js\n```\n\n## setup the network and webapp\n\nWe will use secure websockets (although you don't have to), so first generate the certificate :\n```bash\n./jrpc-node.genCert.sh\n```\n\nInstall the requirements :\n\n```bash\nnpm i\n```\n\n## Start jrpc-node\n\nStart the nodejs JRPC-OO side :\n\n```\n./jrpc-node.js\n```\n\n## Start lit-jrpc\n\nStart the web dev server :\n\n```bash\nnpm start\n```\nIf the browser doesn't open to the demo, manually copy the url from the command line to the browser.\n\nNote : for the first time, look at the console, as you have to clear the browser to use the private cert in this example due to the browser's \"privacy error\".\n\n## In the browser\n\nClick the Test.sayHello button to execute the Test::sayHello C++ code on the other side of the network.\n\n# Customise this microapp\n\nWe will clone and take ownership of the webcomponent and node class. We will use vanilla in place of lit.\n* First clone the repo : ```git clone https://github.com/flatmax/lit-jrpc-node.git```\n* Rename the repo : ```mv lit-jrpc-node vanilla-jrpc-node```\n\n## Rename the webcomponent\n\nSteps to create your own web component :\n* Choose a name for your component : I will choose VanillaJRPC (vanilla-jrpc)\n* Rename some files in the repo :\n  * mv lit-jrpc.js vanilla-jrpc.js\n  * mv src/LitJRPC.js src/VanillaJRPC.js\n* Find and replace the component name :\n  * Replace \"LitJRPC\" for \"VanillaJRPC\"\n  * Replace \"lit-jrpc\" for \"vanilla-jrpc\"\n\n## Customise your OO class\n\n* Choose a name for your class : I will choose VanillaNode\n* Rename the class file :\n  * mv TestClass.js VanillaNode.js\n* Find and replace the class name :\n  * Replace \"TestClass\" for \"VanillaNode\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflatmax%2Flit-jrpc-swig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflatmax%2Flit-jrpc-swig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflatmax%2Flit-jrpc-swig/lists"}