Compare commits

..

1 Commits

Author SHA1 Message Date
bdc700f7a3 1
555

Signed-off-by: lxbfYeaa <testing@example.com>
2026-04-12 17:51:28 +00:00
2 changed files with 24 additions and 17 deletions

24
backEnd/index.ts Normal file
View File

@@ -0,0 +1,24 @@
require("module-alias/register"); // 别名加载
import express from "express";
import bodyParser from "body-parser";
import routerIndex from "./src/router/index";
import { createConnection } from "typeorm";
import cors from "cors";
const app = express();
const port = 8101;
createConnection().then(() => {
console.log("数据库连接成功!");
app.listen(port, () => {
console.log(`开始监听${port}`);
});
});
app.use(bodyParser.urlencoded({ extended: true })); // 进行url解码
app.use(bodyParser.json());
app.use(cors());
// 匹配接口路由
app.use("/", routerIndex);

View File

@@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./index.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>德孝善延伸服务系统</title>
</head>
<body>
<div id="app"></div>
<!-- <script src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_29405_22.fc87eeefd2303d03e310328c39223ebb.js"></script> -->
<script type="module" src="/src/main.ts"></script>
</body>
</html>