mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-10-31 19:39:20 +08:00 
			
		
		
		
	parse the port to int
This commit is contained in:
		| @@ -20,7 +20,7 @@ const { login } = require("./auth"); | |||||||
| const passwordHash = require("./password-hash"); | const passwordHash = require("./password-hash"); | ||||||
| const version = require("../package.json").version; | const version = require("../package.json").version; | ||||||
| const hostname = args.host || "0.0.0.0" | const hostname = args.host || "0.0.0.0" | ||||||
| const port = process.env.PORT || args.port || 3001 | const port = parseInt(process.env.PORT || args.port || 3001); | ||||||
|  |  | ||||||
| console.info("Version: " + version) | console.info("Version: " + version) | ||||||
|  |  | ||||||
| @@ -98,7 +98,9 @@ let indexHTML = fs.readFileSync("./dist/index.html").toString(); | |||||||
|             totalClient--; |             totalClient--; | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|  |         // *************************** | ||||||
|         // Public API |         // Public API | ||||||
|  |         // *************************** | ||||||
|  |  | ||||||
|         socket.on("loginByToken", async (token, callback) => { |         socket.on("loginByToken", async (token, callback) => { | ||||||
|  |  | ||||||
| @@ -191,7 +193,9 @@ let indexHTML = fs.readFileSync("./dist/index.html").toString(); | |||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|  |         // *************************** | ||||||
|         // Auth Only API |         // Auth Only API | ||||||
|  |         // *************************** | ||||||
|  |  | ||||||
|         socket.on("add", async (monitor, callback) => { |         socket.on("add", async (monitor, callback) => { | ||||||
|             try { |             try { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user