portboy
v0.1.2
Published
This is the JavaScript client for the [Portboy](https://hex.pm/packages/portboy) Elixir library.
Downloads
4
Readme
portboy/clients/js
This is the JavaScript client for the Portboy Elixir library.
Example
import { z, register, run } from "portboy";
function add(x: number, y: number) {
return x + y
}
const add_schema = z.object({
x: z.number(),
y: z.number()
}).strict()
const registry = register([
{function: add, schema: add_schema}
])
run(registry);
Portboy.run_exit({"/usr/bin/js", ["./clients/js/out/example.js"]}, "add", %{x: 1, y: 2})