mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 04:54:58 +08:00
34 lines
896 B
JavaScript
34 lines
896 B
JavaScript
![]() |
|
||
|
import bodyParser from "body-parser";
|
||
|
// 解决跨域
|
||
|
import cors from "cors";
|
||
|
import common from "./core/common.js";
|
||
|
import featureTable from "./core/featureTable.js";
|
||
|
import AIMedicineTable from "./core/AIMedicineTable.js";
|
||
|
import doctorMedicineTable from "./core/doctorMedicineTable.js";
|
||
|
|
||
|
// root/Gao!8636
|
||
|
const app = common.app;
|
||
|
const connection = common.connection;
|
||
|
const nowTime = common.nowTime;
|
||
|
|
||
|
//配置ajax跨域请求
|
||
|
app.use(cors({
|
||
|
origin: "*",
|
||
|
credentials: true //每次登陆都验证跨域请求,要不会每次报跨域错误
|
||
|
}));
|
||
|
// 配置 bodyParser
|
||
|
app.use(bodyParser.urlencoded({ extended: false }));
|
||
|
app.use(bodyParser.json());
|
||
|
|
||
|
app.listen(3001, () => console.log('服务启动! ' + nowTime()));
|
||
|
|
||
|
connection().connect();
|
||
|
|
||
|
featureTable.getTable();
|
||
|
AIMedicineTable.getTable();
|
||
|
doctorMedicineTable.getTable();
|
||
|
|
||
|
// MedicineFeadbackInfoTable
|
||
|
// TimingFeadbackInfoTable
|