ContributingWeb client
How the dashboard gets into ferryd
The build script of ferry-api puts each file of web/dist into the ferryd binary.
npm run build. It writes web/dist/index.html and web/dist/assets/*.
1 / 3
The binary contains the dashboard. Thus ferryd needs no other file to serve it.
The build script
| Case | What the build script embeds |
|---|---|
web/dist exists | Each file of web/dist |
FERRY_WEB_DIST has a value | Each file of that directory |
| No built client | A placeholder page that explains how to build the client |
Because of the placeholder, the Rust workspace always compiles.
Try a build with no Rust compile
To try a production build in a real server, point ferryd at the directory:
cd web && npm run build && cd ..
FERRY_UI_DIR=web/dist ./target/debug/ferrydferryd then serves the files of web/dist from the disk. What ferryd answers gives the rules for each path.