-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
28 lines (24 loc) · 701 Bytes
/
index.js
File metadata and controls
28 lines (24 loc) · 701 Bytes
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
import express from "express";
import cors from "cors";
const app = express();
app.use(cors());
app.get("/frame", (req, res) => {
res.json({
title: "💣 WarpWin - Minesweeper",
description: "0.001 ETH öde, tüm bombaları geç, 0.1 ETH kazan!",
image: "https://your-ngrok-url.com/frame-preview.png",
post_url: "https://your-ngrok-url.com/frame/action",
buttons: [
{ label: "Play WarpWin", action: "post" },
]
});
});
app.post("/frame/action", (req, res) => {
return res.json({
type: "frame",
frame_url: "https://warpwin-game.vercel.app",
});
});
app.listen(3001, () => {
console.log("✅ Frame server running at http://localhost:3001/frame");
});