Sometimes the easiest way to learn a new library is to not by guide but by example. Several example projects have been created to demonstrate how Prim+RPC can be used in different environments and integrated with popular frameworks.
See the README.md
file in each linked example for an overview of that project.
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.
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.
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.
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.
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.
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.
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.
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.