How to write the right backend for proxying fetch requests on the service https://timeweb.cloud /?

I use fetch queries on https://api.openai.com on React to use ChatGPT, I have a working backend code and it is hosted on the server https://vercel.com / and it works correctly. But it turned out that there are restrictions on vercel servers and if the response should come from a relatively large chat, then it falls into an error and nothing comes, that is, short answers from the gpt chat come correctly, and large ones fall into an error.

I decided to post it on another service https://timeweb.cloud /, but the code with vercel does not work on this service, and it did not work out to register it correctly myself. In fact, you need a very simple code on the backend so that when you request a fetch on its domain/api, it redirects the request from its foreign ip address to https://api.openai.com/v1/chat/completions and the answer was passed back. Who can help?