| | |
| | | const bodyParser = require('body-parser'); |
| | | const mysql = require('mysql2'); |
| | | const fs = require('fs').promises; |
| | | const fs2=require('fs') |
| | | const path = require('path'); |
| | | const moment = require('moment') |
| | | // 转成能识别的url |
| | |
| | | return new facebody20191230.default(config); |
| | | } |
| | | app.get('/',async(req,res)=>{ |
| | | res.send('设备交换患者信息333'); |
| | | const filePath = path.join(__dirname, 'public', 'index.html'); |
| | | fs2.readFile(filePath, 'utf8', (err, data) => { |
| | | if (err) { |
| | | res.status(500).send('Error reading file'); |
| | | return; |
| | | } |
| | | res.send(data); |
| | | }); |
| | | }) |
| | | // 定义 /webuser 路由处理器 用患者code 换信息 |
| | | app.post('/webuser', async (req, res) => { |