RPC Docs.

Prim+RPC is prerelease software. It may be unstable and functionality may change prior to full release.

Examples

I've created a few projects to demonstrate various ways that Prim+RPC could be used. It's not an exhaustive list and the examples are intended to be very simple but they should provide a great reference or even as a starting point for working with Prim+RPC.

See the README.md files in each linked example for an overview. Each example is commented thoroughly to explain each step. If you only need to see examples of how to use certain features of Prim+RPC, you may also read the Usage guide.

Simple Test

Open in StackBlitz

This example demonstrates the simplest usage of Prim+RPC: in a single file as it may be used in a testing environment.

You can download this example with the command below or download Simple Test directly.

Server/Client Interaction

Open in StackBlitz

This example demonstrates communication between a web server and website in the same project with Prim+RPC.

You can download this example with the command below or download Server/Client Interaction directly.

Serverless

Open in StackBlitz

This example demonstrates communication between a serverless function and website in the same project with Prim+RPC.

You can download this example with the command below or download Serverless directly.

Web Worker Communication

Open in StackBlitz

This example demonstrates communication between a website and its Web Worker.

You can download this example with the command below or download Web Worker Communication directly.

Monorepo Setup

Open in StackBlitz

This example demonstrates a monolithic repository where a separate JavaScript module is imported by a web server using Prim+RPC.

You can download this example with the command below or download Monorepo Setup directly.

Custom JSON Handler

Open in StackBlitz

This example demonstrates a Prim+RPC project where the JSON handler is replaced with an alternative handler.

You can download this example with the command below or download Custom JSON Handler directly.

Server Context

Open in StackBlitz

This example demonstrates a web server that shares its request context with Prim+RPC.

You can download this example with the command below or download Server Context directly.

Fullstack Framework

Open in StackBlitz

This example demonstrates Prim+RPC when used in a fullstack framework.

You can download this example with the command below or download Fullstack Framework directly.

Prim+RPC: a project by Ted Klingenberg

Dose of Ted

Anonymous analytics collected with Ackee