How to build the just web-app

I am trying to deploy web-app to cloudflare pages. Cloudflare pages uses git commit and checks out code . Then builds and deploy the web-app. I would like to build just the web-app is this possible
4 Replies
MEE6
MEE62d ago
Wohooo @p4j4r5, you just became a Waspeteer level 3!
kapa.ai
kapa.ai2d ago
Hi @p4j4r5. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Yes, it is possible to build just the web app in Wasp. Here are the steps you need to follow: 1. Navigate to the .wasp/build/web-app directory in your project:
cd .wasp/build/web-app
cd .wasp/build/web-app
2. Run the following command to build the web client:
npm install && REACT_APP_API_URL=<url_to_wasp_backend> npm run build
npm install && REACT_APP_API_URL=<url_to_wasp_backend> npm run build
Replace <url_to_wasp_backend> with the URL of the Wasp server that you previously deployed. This command will build the web client and put it in the build/ directory in the web-app directory. Please note that the app's frontend is just a bunch of static files, so you can deploy it to any static hosting provider, including Cloudflare Pages. For more details, you can refer to the Wasp documentation (https://wasp-lang.dev/docs/advanced/deployment/manually#3-deploying-the-web-client-frontend). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @p4j4r5, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
p4j4r5
p4j4r52d ago
Directory .wasp/build/web-app won't exist unless I run wasp build
martinsos
martinsos2d ago
You want be able to do it that way. Yo can however do wasp buidl, take its result for the web-app (client), and push that to a git branch that Cloudflare Pages will then pick up.
Want results from more Discord servers?
Add your server