File size: 474 Bytes
15fe565
 
 
 
 
37ffed7
15fe565
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import express from 'express';
import { randomBytes } from "crypto";
const app = express();

const startServer = async (app) => {
    const port = 7860
    app.listen(port, "0.0.0.0", () => {
        console.log(`Server running on http://localhost:${port}`);
        console.log(randomBytes(32).toString('hex'))
    });
};

app.post('/webhook', (req, res) => {
    console.log('Received webhook:', req.body);
    res.status(200).send('Webhook received');
});

startServer();