flat-fuchsia
flat-fuchsia13mo ago

Deploying to DO app platform with Fetch

Hello, So I have a fetch script on one of my edit pages that when the page loads it sends the ID of the page to a webserver and that returns a bunch of different items that are used in a few selects. Those items are updated regularly and thus the need to fetch them. How can I deploy refine as a web service on digital ocean app platform instead of as a static site so that the fetch continues to work?
8 Replies
kapa.ai
kapa.ai13mo ago
Hi @erekyu. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
kapa.ai
kapa.ai13mo ago
---------------------- Hmm, I don't know enough to give you a confident answer yet about deploying refine on Digital Ocean App Platform specifically. However, I can provide you with some general information on deploying a refine app. Deploying a refine app is similar to deploying any other React app. You can follow the general guidelines for deploying React applications on the Digital Ocean App Platform. Here's an example of deploying a refine app on Netlify, which might give you some insights into the deployment process: 1. Create a free account on Netlify.com (https://www.netlify.com/). 2. Click Add new site > Import an existing project. 3. Choose GitHub and follow the on-screen instructions to authenticate your GitHub account. Then, choose your project’s GitHub repository from the list provided. 4. Review and confirm the settings provided by Netlify. These settings should already be correctly configured for your refine project. Simply scroll down and click Deploy site. For more information on deploying refine applications, you can refer to the refine documentation on deployment (https://refine.dev/docs/tutorial/getting-started/deploy-project). For deploying on Digital Ocean App Platform, you can follow their official documentation (https://www.digitalocean.com/docs/app-platform/) and adapt the process for your refine application. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
DigitalOcean
App Platform | DigitalOcean Documentation
App Platform is a platform as a service (PaaS) offering that lets you publish code directly to DigitalOcean servers without worrying about the underlying infrastructure, runtimes, or dependencies.
kapa.ai
kapa.ai13mo ago
<@66380739771379712> kapa.ai is still learning and improving, please let us how it did by reacting below
equal-aqua
equal-aqua13mo ago
The deployment process of refine is no different from any other React application
flat-fuchsia
flat-fuchsia13mo ago
I think my issue is that I have a fetch in my edit page that gets data from a server but it isn't static data so it can be different every time the edit page is loaded. It works in dev but when I deploy it then it does not work so I thought maybe I was deploying it wrong.
equal-aqua
equal-aqua13mo ago
when you enter the web app, it should fetch latest data. I don't know what could go wrong with the information I have
ratty-blush
ratty-blush13mo ago
Hello @erekyu make sure you are passing ENV variables, API url correctly, there are many possibilities might be causing that, we can't know for sure without more details.
flat-fuchsia
flat-fuchsia13mo ago
Thank you guys, it was my issue I was testing it with a script that was not ssl and when I looked into it further I found the issue and once i added an ssl cert to the script it started working