mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-03-05 00:44:46 +00:00
fix linter errors
This commit is contained in:
parent
d1caecde98
commit
bd112b497a
2 changed files with 8 additions and 6 deletions
|
@ -154,7 +154,7 @@ let needSetup = false;
|
||||||
await initDatabase(testMode);
|
await initDatabase(testMode);
|
||||||
|
|
||||||
exports.entryPage = await setting("entryPage");
|
exports.entryPage = await setting("entryPage");
|
||||||
|
|
||||||
const mainRouter = express.Router();
|
const mainRouter = express.Router();
|
||||||
await StatusPage.loadDomainMappingList();
|
await StatusPage.loadDomainMappingList();
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ let needSetup = false;
|
||||||
response.send(server.indexHTML);
|
response.send(server.indexHTML);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.use(server.basePath, mainRouter);
|
app.use(server.basePath, mainRouter);
|
||||||
|
|
||||||
log.info("server", "Adding socket handler");
|
log.info("server", "Adding socket handler");
|
||||||
|
|
|
@ -55,7 +55,7 @@ class UptimeKumaServer {
|
||||||
if (!basePathEnv.endsWith("/")) {
|
if (!basePathEnv.endsWith("/")) {
|
||||||
basePathEnv = basePathEnv + "/";
|
basePathEnv = basePathEnv + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.basePath = basePathEnv;
|
this.basePath = basePathEnv;
|
||||||
|
|
||||||
log.info("server", "Creating express and socket.io instance");
|
log.info("server", "Creating express and socket.io instance");
|
||||||
|
@ -74,7 +74,7 @@ class UptimeKumaServer {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.indexHTML = fs.readFileSync("./dist/index.html").toString();
|
this.indexHTML = fs.readFileSync("./dist/index.html").toString();
|
||||||
this.indexHTML = this.indexHTML.replace(/<base href.*?\>/, `<base href="${this.basePath}">`);
|
this.indexHTML = this.indexHTML.replace(/<base href.*?>/, `<base href="${this.basePath}">`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// "dist/index.html" is not necessary for development
|
// "dist/index.html" is not necessary for development
|
||||||
if (process.env.NODE_ENV !== "development") {
|
if (process.env.NODE_ENV !== "development") {
|
||||||
|
@ -82,8 +82,10 @@ class UptimeKumaServer {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.io = new Server(this.httpServer, {path: this.basePath + "socket.io"});
|
this.io = new Server(this.httpServer, {
|
||||||
|
path: this.basePath + "socket.io"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async sendMonitorList(socket) {
|
async sendMonitorList(socket) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue