Raybilhelp commited on
Commit
e25b8bd
·
verified ·
1 Parent(s): cf9df64

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +10 -7
index.js CHANGED
@@ -2,22 +2,25 @@ const express = require('express');
2
  const app = express();
3
  const PORT = 7860;
4
 
5
- // ১. হোম পেজ (এটি চেকরার জন সারভাজ্যান্তকি না)
6
  app.get('/', (req, res) => {
7
- res.send("Turbo Tempest Server is Live!");
8
  });
9
 
10
- // ২. Adsgram Reward পেজ
11
  app.get('/reward', (req, res) => {
12
  const userId = req.query.userid;
 
13
  if (userId) {
14
- console.log("Reward request for:", userId);
 
15
  return res.status(200).send("OK");
16
  }
17
- res.status(400).send("Missing UserID");
 
18
  });
19
 
20
- // ৩. পোর্ট সেটিংস (Hugging Face এর জন্য এটি জরুরি)
21
  app.listen(PORT, '0.0.0.0', () => {
22
- console.log(`Server running on port ${PORT}`);
23
  });
 
2
  const app = express();
3
  const PORT = 7860;
4
 
5
+ // ১. হোম রাউট (এটি থালে ড্যশবোর্ কে লিক কলে আর ৪0৪ সবে না)
6
  app.get('/', (req, res) => {
7
+ res.send("<h1>Server is Running!</h1><p>Adsgram Reward Server is Live.</p>");
8
  });
9
 
10
+ // ২. Adsgram রিওয়ার্ড রাউট (যেটি আনার আসল কাজন্য)
11
  app.get('/reward', (req, res) => {
12
  const userId = req.query.userid;
13
+
14
  if (userId) {
15
+ console.log(`Success: Reward signal received for User: ${userId}`);
16
+ // এখানে পরে আমরা ডাটাবেস আপডেট করার কোড যোগ করব
17
  return res.status(200).send("OK");
18
  }
19
+
20
+ return res.status(400).send("Error: No UserID provided");
21
  });
22
 
23
+ // ৩. পোর্ট সেটিংস (Hugging Face এর জন্য এটি এভাবেই থাকতে হবে)
24
  app.listen(PORT, '0.0.0.0', () => {
25
+ console.log(`Server is listening on port ${PORT}`);
26
  });