You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 18, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 18, 2026. It is now read-only.
I'd like to add a custom route to the labelerServer.app instance such that I can respond to a webhook request to regenerate my label assignments, but whenever I try to add a route to the app, it just fails to start the labelerServer.
I've tried this as the most basic example
labelerServer.app.get("/my-custom-route", async (_req, res) => {
// Logic should go here
return res.send();
});
// Start the label server listener here
Should this be able to work? And am I doing something wrong?
Hmm, looks like a timeout resolves this. I guess the websocket connection needs to come first and then the registrations, but given I initialize the route straight after creating the labeler server instance it's not finished waiting on the promise so I seem to need to wait a few ms before I can register routes
Activity
mattbrailsford commentedon Dec 10, 2024
Hmm, looks like a timeout resolves this. I guess the websocket connection needs to come first and then the registrations, but given I initialize the route straight after creating the labeler server instance it's not finished waiting on the promise so I seem to need to wait a few ms before I can register routes
mattbrailsford commentedon Dec 10, 2024
Maybe it would be nice if we could pass a callback to the constructor to perform additional config?
Refactor: Use async LabelerServer.create() for initializing the serve…
Refactor: Use async LabelerServer.create() for initializing the serve…
Refactor: Use async LabelerServer.create() for initializing the serve…