Spaces:
Paused
Paused
Update hf.js
Browse files
hf.js
CHANGED
|
@@ -8,12 +8,11 @@ app.use(express.urlencoded({ extended: true, limit: '50mb' }));
|
|
| 8 |
app.use('hf/v1/chat/completions', createProxyMiddleware({
|
| 9 |
target: 'http://localhost:3010',
|
| 10 |
pathRewrite: {
|
| 11 |
-
'hf/
|
| 12 |
},
|
| 13 |
-
changeOrigin: true,
|
| 14 |
}));
|
| 15 |
|
| 16 |
const port = process.env.HF_PORT || 7860;
|
| 17 |
app.listen(port, () => {
|
| 18 |
-
console.log(`
|
| 19 |
});
|
|
|
|
| 8 |
app.use('hf/v1/chat/completions', createProxyMiddleware({
|
| 9 |
target: 'http://localhost:3010',
|
| 10 |
pathRewrite: {
|
| 11 |
+
'^/hf/': '/',
|
| 12 |
},
|
|
|
|
| 13 |
}));
|
| 14 |
|
| 15 |
const port = process.env.HF_PORT || 7860;
|
| 16 |
app.listen(port, () => {
|
| 17 |
+
console.log(`HF Proxy server is running at PORT: ${port}`);
|
| 18 |
});
|