Experimental app using Fastify for server, and SvelteKit for frontend.
The server responds to /api/counter
with JSON of the form:
{ "hello": "world", "count": count++ }
The frontend calls the api when a button is clicked, and renders the response.
Build static site into the frontend/build
directory.
NOTE: The frontend currently assumes that the api is hosted at the same origin.
cd frontend
npm install
npm run build
cd ..
The server hosts the frontend static site at /
.
npm install
npm start