chb2024 commited on
Commit
3af825f
·
verified ·
1 Parent(s): 8f4f760

Create index.js

Browse files
Files changed (1) hide show
  1. index.js +17 -0
index.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // 导入Express.js框架
2
+ const express = require('express');
3
+ const app = express();
4
+
5
+ // 设置端口号(Hugging Face默认端口)
6
+ const port = 8080;
7
+
8
+ // 定义根路由的GET请求
9
+ app.get('/', (req, res) => {
10
+ // 发送一个简单的响应,表示狗狗币挖矿正在正常运行
11
+ res.send('狗狗币挖矿正在正常运行...');
12
+ });
13
+
14
+ // 启动服务器
15
+ app.listen(port, () => {
16
+ console.log(`服务器正在运行于 http://localhost:${port}`);
17
+ });