Build react project to serve on quart/flask

Simply wondering if it was possible to npm run build to build a react application for my python quart application to serve before deploying the quart application
Solution:
theres nothing wrong with your current setup of frontend on cloudflare and backend on railway, in fact thats a much better way
Jump to solution
8 Replies
Percy
Percyβ€’2y ago
Project ID: N/A
Brody
Brodyβ€’2y ago
if your package.json has a build script, it will be ran
Tom te Bomb 🐑🦈
no but the actual deployment is python, like its a quart application thats being deployed and exposed but one quart route would serve a static html file built from a react application, I'm just not sure if that is possible other than building it beforehand, since that requires both py and node...? not sure if I'm explaining this well enough...
Brody
Brodyβ€’2y ago
mind sending your repo?
Tom te Bomb 🐑🦈
sure but Ive not implemented that yet, initially (and still now) Ive just been hosting the frontend on cloudflare and the backend (quart app) on railway and thats fine but Ive just discovered that I can serve the react app through the backend to only need to only host the backend so I just wanted to know if I could do that
Solution
Brody
Brodyβ€’2y ago
theres nothing wrong with your current setup of frontend on cloudflare and backend on railway, in fact thats a much better way
Tom te Bomb 🐑🦈
oh well yea I just thought the less the better πŸ˜… but I guess thanks
Want results from more Discord servers?
Add your server