|
|
|
|
|
by sureglymop
632 days ago
|
|
I love web dev using rust! I use sveltekit and proxy all requests to /api to a rust backend (though it works with any SSR framework). This is nicely configurable for the vite dev server. Then I basically have all the business logic on the rust side and all the presentation logic on the SSR side to get the best of both worlds. This gives me two things: 1. A development experience with instant visual feedback for the frontend. Even more so when using tailwind. 2. A stable, safe and performant backend. The downside is that a node process has to be running and doing the ssr, though that is an okay trade off for me because my project is mainly the api, having a reference implementation of the frontend is just a nice extra. I've also experimented with implementing the reverse proxy in rust itself and using a unix socket and other IPC mechanisms to push the data to the SSR layer. |
|
I think this most people would call this backend-, api- or service development. Especially if your api endpoint does not do anything web specific except http.
Anyway, how do you share types between the backend and frontend? Are you rawdogging json?