generateCode.ts:23 WebSocket connection to 'ws://127.0.0.1:7001/generate-code' failed:
DaihuaWei opened this issue · comments
1、Already configurate the VITE_WS_BACKEND_URL:
2、curl http://192.168.1.52:7001 is OK, like this:Your backend is running correctly. Please open the front-end URL (default is http://localhost:5173) to use screenshot-to-code.
3、http://192.168.1.52:5173/,
4、when I upload one video or image,the process interface is 127.0.0.1:7001,like this:
5、I don't know what's wrong? hope your help
Hi, thanks for the clear walkthrough of your steps. All you need to do is update the frontend .env. See https://github.com/abi/screenshot-to-code?tab=readme-ov-file#%EF%B8%8F-faqs "How can I update the backend host that my front-end connects to?"
Please close the ticket once you confirm that it works for you.
Hi, thanks for the clear walkthrough of your steps. All you need to do is update the frontend .env. See https://github.com/abi/screenshot-to-code?tab=readme-ov-file#%EF%B8%8F-faqs "How can I update the backend host that my front-end connects to?"
According to your guidance, I do like this:
1、In front docker container, change the VITE_WS_BACKEND_URL=ws://192.168.1.152:7001 to VITE_HTTP_BACKEND_URL=http://192.168.1.52:7001
2、then restart the front and backend container
3、But the result is same as bellow, like this:
I missing something or doing something wrong, hope your help, thank you
Yes, you have to create it.
Alternatively you can update directly in code here:
Let me know if that solves your problem!
Yes, for videos, you need a ANTHROPIC_API_KEY that you'll add to backend/.env
When you upload a PNG like that, what do the backend logs look like?
@DaihuaWei You're not able to connect to the OpenAI API. Is OpenAI banned in your country? Please see FAQs "How can I configure an OpenAI proxy?" https://github.com/abi/screenshot-to-code?tab=readme-ov-file#%EF%B8%8F-faqs
Closing due to inactivity