Vladimir Alabov commited on
Commit
9aff024
1 Parent(s): 8db509b
Files changed (1) hide show
  1. server.js +6 -7
server.js CHANGED
@@ -3,16 +3,15 @@ const proxy = require('express-http-proxy');
3
  const app = express();
4
  const targetUrl = 'https://generativelanguage.googleapis.com';
5
  const port = 7860;
6
- const baseUrl = 'gem';
7
 
8
  app.use('/', proxy(targetUrl, {
9
- https: true,
10
- proxyReqOptDecorator: (proxyReqOpts, srcReq) => {
11
- // console.log(srcReq);
12
- return proxyReqOpts;
13
  },
14
  }));
15
 
16
- app.get("/", (req, res) => {
17
- res.send(`This is your GRP URL: ${baseUrl}`);
18
  });
 
3
  const app = express();
4
  const targetUrl = 'https://generativelanguage.googleapis.com';
5
  const port = 7860;
 
6
 
7
  app.use('/', proxy(targetUrl, {
8
+ https: true,
9
+ proxyReqOptDecorator: (proxyReqOpts, srcReq) => {
10
+ // console.log(srcReq);
11
+ return proxyReqOpts;
12
  },
13
  }));
14
 
15
+ app.listen(port, () => {
16
+ console.log(`GRP`);
17
  });