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 applicationSolution:Jump to solution
theres nothing wrong with your current setup of frontend on cloudflare and backend on railway, in fact thats a much better way
8 Replies
Project ID:
N/A
n/a
if your package.json has a build script, it will be ran
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...
mind sending your repo?
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
theres nothing wrong with your current setup of frontend on cloudflare and backend on railway, in fact thats a much better way
oh well yea I just thought the less the better π
but I guess thanks