ok so here's the deal. initially i was going to make a JS backend and run the frontend as another endpoint...
BUT! it turns out that the javascript frontend ecosystem is abysmal and will not help you if you aren't 100% bought into a framework. you just can't host a server-side-rendered frontend as "just another endpoint". this sucks. what the fuck.
that is why you need to host and maintain this as a separate service. i'm sorry, it's out of my hands. and as a bonus i get to use a better language for the non-presentation parts
and no i am NOT doing a pure js-dependant single-page-app. fuck that.
requirements
- node
- pnpm (for building)
external services
- the backend (https://codeberg.org/outpost/backend)
developing
- set up a local reverse proxy such as Caddy
pnpm i(for dependencies)pnpm run -r /^gen:/- edit
packages/frontend/.envas appropriate - run the backend on
localhost:5014(default), configuring it to be on the same hostname as the frontend, as logging in requires this pnpm run -r dev
typescript and eslint may complain until you've ran dev or build at least once, as some type definitions get generated at build time
building
pnpm i(for dependencies)pnpm run -r /^gen:/pnpm run build
you can then place the packages/frontend/build directory anywhere a compatible node installation exists