|
@@ -27,9 +27,9 @@ const Kind = {
|
|
|
|
|
|
|
|
|
const db = mysql.createConnection({
|
|
|
- host: 'mc.andyxie.cn',
|
|
|
- user: 'instrunet',
|
|
|
- password: 'Moyingren2015',
|
|
|
+ host: 'localhost',
|
|
|
+ user: 'root',
|
|
|
+ password: 'moyingren2015',
|
|
|
database: "instrunet_data",
|
|
|
pool: pool,
|
|
|
enableKeepAlive: true,
|
|
@@ -538,9 +538,11 @@ app.get("/favicon.ico", function (req, res) {
|
|
|
})
|
|
|
let availCache = {};
|
|
|
|
|
|
-// setInterval(() => {
|
|
|
-// availCache = {};
|
|
|
-// }, 1800000)
|
|
|
+setInterval(() => {
|
|
|
+ db.execute("SELECT 1", (err, result) => {
|
|
|
+
|
|
|
+ })
|
|
|
+}, 10000)
|
|
|
|
|
|
// Fetch
|
|
|
app.get('/:uuid', async function (req, res) {
|