ishaan1013 / sandbox

A cloud-based code editing environment with an AI copilot and real-time collaboration
MIT License
1.25k stars 95 forks source link

How does the preview work? #30

Open i-am-henri opened 1 month ago

i-am-henri commented 1 month ago

It's less a issue, more a question. How does your preview work? I already understand, that all files are saved in the storage from cloudflare, but how do you proceed? I the preview/index.tsx file, you create an iframe to the local url "localhost:5173" or smthg. like that, but where is the server for that port?

anudeepreddy commented 1 month ago

Same question here

anudeepreddy commented 1 month ago

I guess I got my answer, the preview works if the server is running locally. The code and the terminal is executed without any isolation. If the server was to be hosted on a remote machine then the preview wouldn't work as there is no provision yet to access the react app running on a remote backend.