kamiwork commited on
Commit
445d230
·
verified ·
1 Parent(s): 0054851

Create index.js

Browse files
Files changed (1) hide show
  1. index.js +16 -0
index.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const express = require('express');
2
+ const app = express();
3
+ const port = process.env.PORT || 7860; // Render ko yahi port batana hoga
4
+
5
+ app.get('/', (req, res) => {
6
+ res.send('✅ TraffMonetizer + Express Running');
7
+ });
8
+
9
+ app.get('/health', (req, res) => {
10
+ res.json({ status: 'healthy', time: new Date().toISOString() });
11
+ });
12
+
13
+ // ❗ ZAROORI: Listen on 0.0.0.0, not localhost or 127.0.0.1
14
+ const server = app.listen(port, '0.0.0.0', () => {
15
+ console.log(`✅✅✅ SERVER STARTED on port ${port}`);
16
+ });