a
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Uniapp Material Design项目开发服务器 - 增强版(包含文章列表)
|
||||
* 绑定到所有IP地址,支持公网访问
|
||||
*/
|
||||
|
||||
const express = require('express');
|
||||
const cors = require('cors');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
// 创建Express应用
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 8000;
|
||||
const HOST = '0.0.0.0'; // 绑定到所有IP
|
||||
|
||||
// 启用CORS
|
||||
app.use(cors());
|
||||
|
||||
// 解析JSON请求体
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded({ extended: true
|
||||
Reference in New Issue
Block a user