advertise over beacon v2 as metamesh.enrich/<id> so meta-sort's Plugins page can find it (Scan -> Add)
Build and Push Docker Image / build (push) Failing after 14s
Build and Push Docker Image / build (push) Failing after 14s
This commit is contained in:
+3
-2
@@ -24,6 +24,7 @@
|
||||
import Fastify from 'fastify';
|
||||
import type { HealthResponse, ProcessRequest, ProcessResponse, CallbackPayload, ConfigureRequest, ConfigureResponse } from './types.js';
|
||||
import { manifest, process as processFile } from './plugin.js';
|
||||
import { startBeacon, stopBeacon } from './beacon-advertise.js';
|
||||
|
||||
const app = Fastify({ logger: true });
|
||||
let ready = false;
|
||||
@@ -47,5 +48,5 @@ app.post<{ Body: ProcessRequest }>('/process', async (request, reply) => {
|
||||
});
|
||||
|
||||
const port = parseInt(process.env.PORT || '8080', 10);
|
||||
app.listen({ port, host: '0.0.0.0' }).then(() => { ready = true; console.log(`[${manifest.id}] Listening on port ${port}`); });
|
||||
process.on('SIGTERM', async () => { ready = false; await app.close(); process.exit(0); });
|
||||
app.listen({ port, host: '0.0.0.0' }).then(() => { startBeacon(manifest.id, manifest.version, port); ready = true; console.log(`[${manifest.id}] Listening on port ${port}`); });
|
||||
process.on('SIGTERM', async () => { await stopBeacon(); ready = false; await app.close(); process.exit(0); });
|
||||
|
||||
Reference in New Issue
Block a user