examples/fullstack
projectThe wire types: the validated records and scalars that cross the RPC boundary.
fullstack
A server and a browser client that share one set of wire types, with no hand-written route or validation.
cd examples/fullstack vyrn dev
Layout
- server.vyrn checks the RPC surface first and hands every other request to the file-based pages.
- server/api/users.vyrn is an ordinary module.
rpc("./server/api")mounts each export at/_/users/<name>, andclient("./server/api")builds the browser stubs from its interface, so no procedure body reaches the bundle. - shared/wire.vyrn declares the validated types.
fromJsonruns everywhereclause on the server, so a badagecomes back as a structured 422. - server/pages are the server-rendered pages; app/components are the
.vyxcomponents the client renders.
vyrn serve server.vyrn runs the server alone.