m8chaa commited on
Commit
d479cb1
·
1 Parent(s): f60a33e

app.js removed

Browse files
Files changed (4) hide show
  1. Dockerfile +3 -3
  2. README.md +3 -3
  3. app.js +0 -32
  4. mcp-config.json +1 -1
Dockerfile CHANGED
@@ -53,7 +53,7 @@ RUN chmod -R 755 /app && \
53
 
54
  # Expose the port MCP server will listen on (defined in mcp-config.json)
55
  # This is for Docker internal, README.md handles HF exposure
56
- EXPOSE 8000
57
 
58
- # Start the SIMPLE TEST server (now named app.js)
59
- CMD ["node", "app.js"]
 
53
 
54
  # Expose the port MCP server will listen on (defined in mcp-config.json)
55
  # This is for Docker internal, README.md handles HF exposure
56
+ EXPOSE 7860
57
 
58
+ # Start the Playwright MCP server
59
+ CMD ["node", "node_modules/@playwright/mcp/cli.js", "--config", "mcp-config.json"]
README.md CHANGED
@@ -6,9 +6,9 @@ colorTo: green
6
  sdk: docker
7
  # This is the primary port *inside* the Docker container that MCP listens on.
8
  # Hugging Face Spaces will map this to an external URL.
9
- port: 8000
10
  exposed_ports:
11
- - 8000
12
  pinned: false
13
  app_cpu: basic # Optional: specify basic CPU, can be upgraded later if needed
14
  app_memory: 16Gi # Optional: specify memory
@@ -22,7 +22,7 @@ It is designed to be called by other applications/Spaces that require browser au
22
 
23
  ## Configuration
24
 
25
- - **MCP Server Port (internal):** 8000 (defined in `mcp-config.json` and Dockerfile `EXPOSE`)
26
  - **Exposed via Hugging Face:** The Space URL will point to this service.
27
  - **Browser:** Chromium (installed via Dockerfile)
28
  - **Logging:** Verbose (set in `mcp-config.json`)
 
6
  sdk: docker
7
  # This is the primary port *inside* the Docker container that MCP listens on.
8
  # Hugging Face Spaces will map this to an external URL.
9
+ port: 7860
10
  exposed_ports:
11
+ - 7860
12
  pinned: false
13
  app_cpu: basic # Optional: specify basic CPU, can be upgraded later if needed
14
  app_memory: 16Gi # Optional: specify memory
 
22
 
23
  ## Configuration
24
 
25
+ - **MCP Server Port (internal):** 7860 (defined in `mcp-config.json` and Dockerfile `EXPOSE`)
26
  - **Exposed via Hugging Face:** The Space URL will point to this service.
27
  - **Browser:** Chromium (installed via Dockerfile)
28
  - **Logging:** Verbose (set in `mcp-config.json`)
app.js DELETED
@@ -1,32 +0,0 @@
1
- // playwright_mcp/app.js (Express version)
2
- const express = require('express');
3
- const app = express();
4
- const port = 8000; // Same port as your MCP server and README.md
5
-
6
- // Middleware to log all requests
7
- app.use((req, res, next) => {
8
- const logMessage = `[${new Date().toISOString()}] Express Request received: ${req.method} ${req.url}`;
9
- console.log(logMessage);
10
- next();
11
- });
12
-
13
- app.get('/', (req, res) => {
14
- // Respond with JSON, similar to addcon_purchase
15
- res.json({ "Hello": "World from playwright_mcp Express test!" });
16
- });
17
-
18
- // Catch-all for other routes to return 404
19
- app.use((req, res) => {
20
- res.status(404).send('Not Found\n');
21
- });
22
-
23
- app.listen(port, '0.0.0.0', () => {
24
- const startMessage = `[${new Date().toISOString()}] Express server listening on 0.0.0.0:${port}`;
25
- console.log(startMessage); // Log to stdout
26
- console.error(`[${new Date().toISOString()}] Express server (STDERR) listening on 0.0.0.0:${port}`); // Also log to stderr
27
- });
28
-
29
- // Keep the process alive (optional, Express usually keeps it alive)
30
- setInterval(() => {
31
- console.log(`[${new Date().toISOString()}] Express server still alive...`);
32
- }, 60000);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mcp-config.json CHANGED
@@ -13,7 +13,7 @@
13
  }
14
  },
15
  "server": {
16
- "port": 8000,
17
  "host": "0.0.0.0"
18
  },
19
  "capabilities": ["core", "tabs"],
 
13
  }
14
  },
15
  "server": {
16
+ "port": 7860,
17
  "host": "0.0.0.0"
18
  },
19
  "capabilities": ["core", "tabs"],