randydev commited on
Commit
97f794f
·
verified ·
1 Parent(s): 846ba95

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +5 -8
index.js CHANGED
@@ -2,17 +2,14 @@ import express from 'express';
2
  import { randomBytes } from "crypto";
3
  const app = express();
4
 
5
- const startServer = async (app) => {
6
- const port = 7860
7
- app.listen(port, "0.0.0.0", () => {
8
- console.log(`Server running on http://localhost:${port}`);
9
- console.log(randomBytes(32).toString('hex'))
10
- });
11
- };
12
 
13
  app.post('/webhook', (req, res) => {
14
  console.log('Received webhook:', req.body);
15
  res.status(200).send('Webhook received');
16
  });
17
 
18
- startServer();
 
 
 
 
2
  import { randomBytes } from "crypto";
3
  const app = express();
4
 
5
+ const port = 7860
 
 
 
 
 
 
6
 
7
  app.post('/webhook', (req, res) => {
8
  console.log('Received webhook:', req.body);
9
  res.status(200).send('Webhook received');
10
  });
11
 
12
+ app.listen(port, "0.0.0.0", () => {
13
+ console.log(`Server running on http://localhost:${port}`);
14
+ console.log(randomBytes(32).toString('hex'))
15
+ });