Reaperxxxx commited on
Commit
2dc3a98
Β·
verified Β·
1 Parent(s): 9c7d3b0

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +7 -2
index.js CHANGED
@@ -8,7 +8,7 @@ const { execSync, spawnSync } = require('child_process');
8
  const axios = require('axios');
9
 
10
  const app = express();
11
- const PORT = 3000;
12
 
13
  app.use(express.json({ limit: '200mb' }));
14
  app.use(express.static(path.join(__dirname, 'public')));
@@ -217,8 +217,13 @@ app.post('/patch', express.json({ limit: '10mb' }), (req, res) => {
217
  }
218
  });
219
 
 
 
 
 
 
220
  // ── START ─────────────────────────────────────────────────────────────────────
221
- app.listen(7860, () => {
222
  console.log(`\n🦸 Super City Editor backend running at http://localhost:${PORT}`);
223
  console.log('Open that URL in your browser to use the editor.\n');
224
  try { ensureKeystore(); } catch (e) { console.warn('Keystore not ready yet:', e.message); }
 
8
  const axios = require('axios');
9
 
10
  const app = express();
11
+ const PORT = 7860;
12
 
13
  app.use(express.json({ limit: '200mb' }));
14
  app.use(express.static(path.join(__dirname, 'public')));
 
217
  }
218
  });
219
 
220
+ // ── ROOT ──────────────────────────────────────────────────────────────────────
221
+ app.get('/', (req, res) => {
222
+ res.sendFile(path.join(__dirname, 'index.html'));
223
+ });
224
+
225
  // ── START ─────────────────────────────────────────────────────────────────────
226
+ app.listen(PORT, () => {
227
  console.log(`\n🦸 Super City Editor backend running at http://localhost:${PORT}`);
228
  console.log('Open that URL in your browser to use the editor.\n');
229
  try { ensureKeystore(); } catch (e) { console.warn('Keystore not ready yet:', e.message); }