Download server.js from yufistudio/chat_gpt_proxy_noapi: direct link, hf CLI and curl.
- Browser
- Download file 401 Bytes
-
https://huggingface.co/spaces/yufistudio/chat_gpt_proxy_noapi/resolve/main/server.js
- Command line
-
hf download hf://spaces/yufistudio/chat_gpt_proxy_noapi/server.js
-
curl -L -o server.js https://huggingface.co/spaces/yufistudio/chat_gpt_proxy_noapi/resolve/main/server.js
401 Bytes
| const express = require('express'); | |
| const proxy = require('express-http-proxy'); | |
| const app = express(); | |
| const targetUrl = 'https://chat.gpt.bz'; // OpenAI API endpoint | |
| app.use('/', proxy(targetUrl, { | |
| proxyReqOptDecorator: (proxyReqOpts, srcReq) => { | |
| return proxyReqOpts; | |
| }, | |
| })); | |
| const port = 7860; | |
| app.listen(port, () => { | |
| console.log(`Reverse proxy server listening on port ${port}`); | |
| }); |