
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@dappworks/urpc
Advanced tools
To install dependencies:
bun add @dappworks/urpc
import {
URPC,
createServerClient,
createSimpleHttpClient,
} from "@dappworks/urpc";
const urpc = new URPC({
schemas: {
sum: URPC.Func({
input: { a: 0, b: 0 },
func: ({ input }) => input.a + input.b,
}),
foo: URPC.Var({ get: () => data.foo }),
},
});
// server
const serverClient = createServerClient({ urpc });
const app = new Hono();
app.post("/urpc", async (c) => {
const body = (await c.req.json()) as any;
const res = await serverClient.handle(body);
return c.json(res);
});
// client
const client = createSimpleHttpClient<typeof urpc.schemas>({
url: "http://localhost:3000/urpc",
});
client.func.call();
client.var.set();
client.schema.loadFull();
client.schema.loadVars();
To run:
bun run index.ts
This project was created using bun init
in bun v1.1.3. Bun is a fast all-in-one JavaScript runtime.
FAQs
To install dependencies:
The npm package @dappworks/urpc receives a total of 15 weekly downloads. As such, @dappworks/urpc popularity was classified as not popular.
We found that @dappworks/urpc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.