# NodeBridge **Repository Path**: coooor/NodeBridge ## Basic Information - **Project Name**: NodeBridge - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-30 - **Last Updated**: 2022-01-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # NodeBridge Swift package of a simple bridge between Node.js and Swift. ## Usage ```swift import NodeBridge Addon.handler = { env, value in print(Value(env: env, value: value).description) } Addon.ready = { Addon.callJS(dict: [ "foo": "bar", ]) } ``` ```javascript const NativeBridge = process._linkedBinding('SwiftBridge'); NativeBridge.on((msg, cb) => { console.log(msg); cb({baz: 'abc'}); }); ``` For a real world example app, see https://github.com/kewlbear/Inssagram. ### Swift Package Manager ``` .package(url: "https://github.com/kewlbear/NodeBridge.git", .branch("main")), ``` ## License MIT