Updates
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Optional agent-style HTTP API bound to the PearMonitor agent.
|
||||
*
|
||||
* Default: 127.0.0.1:19999 — local only.
|
||||
* Default: 127.0.0.1:18888 — local only.
|
||||
* Disable with PEARDATA_REST=0
|
||||
*/
|
||||
import http from 'http'
|
||||
@@ -21,7 +21,7 @@ export function startRestServer() {
|
||||
}
|
||||
|
||||
const host = process.env.PEARDATA_REST_HOST || '127.0.0.1'
|
||||
const port = Number(process.env.PEARDATA_REST_PORT) || 19999
|
||||
const port = Number(process.env.PEARDATA_REST_PORT) || 18888
|
||||
|
||||
const server = http.createServer(async (req, res) => {
|
||||
try {
|
||||
|
||||
@@ -306,7 +306,7 @@ export async function handleRest(pathname, query) {
|
||||
return json({
|
||||
sample_ms: Number(process.env.PEARDATA_SAMPLE_MS) || 1000,
|
||||
rest_host: process.env.PEARDATA_REST_HOST || '127.0.0.1',
|
||||
rest_port: Number(process.env.PEARDATA_REST_PORT) || 19999,
|
||||
rest_port: Number(process.env.PEARDATA_REST_PORT) || 18888,
|
||||
tier0_points: Number(process.env.PEARDATA_TIER0_POINTS) || 3600,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user