mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 18:44:17 +00:00
override port with runtime args
This commit is contained in:
parent
b6b0dd438e
commit
fe21554210
@ -96,7 +96,7 @@ const DEFAULT_HEADERS = {
|
|||||||
"Access-Control-Allow-Methods": "GET, POST, OPTIONS, PUT, PATCH, DELETE",
|
"Access-Control-Allow-Methods": "GET, POST, OPTIONS, PUT, PATCH, DELETE",
|
||||||
"Access-Control-Allow-Credentials": "true",
|
"Access-Control-Allow-Credentials": "true",
|
||||||
}
|
}
|
||||||
const DEFAULT_PORT = 1010
|
const DEFAULT_PORT = process.parsedArgs.listenPort ?? 1010
|
||||||
|
|
||||||
//* HELPERS
|
//* HELPERS
|
||||||
function getUptime() {
|
function getUptime() {
|
||||||
@ -170,7 +170,7 @@ function start() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// TODO: set websocket server heap & events
|
// TODO: set websocket server heap & events
|
||||||
SERVER.get("/hearbeat", (req, res, next) => {
|
SERVER.get("/heartbeat", (req, res, next) => {
|
||||||
res.json({
|
res.json({
|
||||||
uptime: getUptime()
|
uptime: getUptime()
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user