mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-03-04 16:35:57 +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);
|
||||
|
||||
exports.entryPage = await setting("entryPage");
|
||||
|
||||
|
||||
const mainRouter = express.Router();
|
||||
await StatusPage.loadDomainMappingList();
|
||||
|
||||
|
@ -232,7 +232,7 @@ let needSetup = false;
|
|||
response.send(server.indexHTML);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
app.use(server.basePath, mainRouter);
|
||||
|
||||
log.info("server", "Adding socket handler");
|
||||
|
|
|
@ -55,7 +55,7 @@ class UptimeKumaServer {
|
|||
if (!basePathEnv.endsWith("/")) {
|
||||
basePathEnv = basePathEnv + "/";
|
||||
}
|
||||
|
||||
|
||||
this.basePath = basePathEnv;
|
||||
|
||||
log.info("server", "Creating express and socket.io instance");
|
||||
|
@ -74,7 +74,7 @@ class UptimeKumaServer {
|
|||
|
||||
try {
|
||||
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) {
|
||||
// "dist/index.html" is not necessary for development
|
||||
if (process.env.NODE_ENV !== "development") {
|
||||
|
@ -82,8 +82,10 @@ class UptimeKumaServer {
|
|||
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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue