File size: 755 Bytes
c185dd0
 
 
 
30155a9
 
 
c185dd0
 
 
30155a9
 
 
 
 
 
 
 
 
 
 
 
c185dd0
30155a9
 
c185dd0
30155a9
 
c185dd0
 
 
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
FROM node:18-alpine

WORKDIR /app

# Create minimal package.json
RUN echo '{"name":"cursor-api","version":"1.0.0","main":"index.js","dependencies":{"express":"^4.18.2"}}' > package.json

# Install dependencies
RUN npm install

# Create a simple API server
RUN echo 'const express = require("express"); \
const app = express(); \
const port = process.env.PORT || 7860; \
\
app.get("/", (req, res) => { \
  res.json({ status: "Cursor API running", auth: process.env.AUTH_TOKEN }); \
}); \
\
app.listen(port, "0.0.0.0", () => { \
  console.log(`Cursor API listening on port ${port}`); \
});' > index.js

# HF Spaces uses port 7860 by default
ENV PORT=7860

# Expose the port (HF Spaces uses 7860)
EXPOSE 7860

# Start the application
CMD ["node", "index.js"]