File size: 814 Bytes
023fd57
 
 
 
 
 
cc867fb
023fd57
cc867fb
 
 
023fd57
 
cc867fb
 
 
 
023fd57
cc867fb
 
 
023fd57
 
cc867fb
 
 
 
023fd57
cc867fb
 
 
 
023fd57
cc867fb
 
 
023fd57
 
cc867fb
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import express from "express";

const app = express();
app.use(express.json());
app.use(express.static("public"));

const PORT = process.env.PORT || 7860;

/* HEALTH CHECK (ÇOK ÖNEMLİ) */
app.get("/", (req, res) => {
  res.send("🚀 SAAS IS LIVE");
});

/* TEST ENDPOINT */
app.get("/ping", (req, res) => {
  res.json({ status: "ok" });
});

/* LOGIN MOCK */
app.post("/auth", (req, res) => {
  res.json({ token: "demo-token-123" });
});

/* RUN MOCK */
app.post("/run", (req, res) => {
  res.json({ output: "Code executed (mock)" });
});

/* AI MOCK */
app.post("/ai", (req, res) => {
  res.json({ result: "// fixed code here" });
});

/* SAVE MOCK */
app.post("/save", (req, res) => {
  res.json({ ok: true });
});

app.listen(PORT, "0.0.0.0", () => {
  console.log("LEVEL 3 SAAS RUNNING 🚀 on", PORT);
});