Update index.js
Browse files
index.js
CHANGED
@@ -1 +1,18 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import express from 'express';
|
2 |
+
import { randomBytes } from "crypto";
|
3 |
+
const app = express();
|
4 |
+
|
5 |
+
const startServer = async (app) => {
|
6 |
+
await startup();
|
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();
|