Implement /status Health Check Endpoint and Refactor Plugin Registration
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
Direzione di ricerca
Inizia esaminando root-status.controller.ts e homeserver.module.ts per comprendere la registrazione del plugin e la gestione degli errori proposte. Verifica che GET / e GET /status restituiscano le risposte descritte e che una route sconosciuta utilizzi la risposta personalizzata di risorsa non trovata; l’issue non menziona un file di test specifico.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
Added a new root-status.controller.ts that provides two routes:
-
GET / — returns a simple welcome message
-
GET /status — returns server uptime, current timestamp, and status
-
Registered this controller plugin in
homeserver.module.ts. -
Also added a custom 404 error handler using app.onError for cleaner “not found” responses.
Key Code Snippets
root-status.controller.ts
import { Elysia } from 'elysia';
export const rootStatusPlugin = new Elysia()
.get('/', () => ({
message: 'Matrix server is live. Try /status.',
}))
.get('/status', () => ({
status: 'ok',
uptime: process.uptime(),
timestamp: new Date().toISOString(),
}));
homeserver.module.ts
app.onError(({ code }) => {
if (code === 'NOT_FOUND') {
return {
error: 'Route not found. Are you lost?',
};
}
});
If this looks good, I’d be happy to create a PR for these changes. Please assign it to me if so, happy to contribute!
- Lingua principale
- TypeScript
- Stelle
- 17
- Fork
- 18
- Merge medio
- 2h 11m
- PR unite (30g)
- 2
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RocketChat/homeserver
-
pruneEventDict and signEvent's `prune` flag should go away entirely, replaced byForse di nuovo libera @sampaiodiego l’ha presa 76 giorni fa e non c’è nessuna pull request aperta. Apertatodo :spiral_notepad: type: feature
RocketChat/homeserver#411 · 1 commento · 1 assegnatario ·
-
Include banned and invited servers in event destination setForse già presa @ggazzo l’ha presa 233 giorni fa. Apertatype: bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
RocketChat/homeserver#388 ·
-
we need a map of rooms and destinations to avoid having to get rooms state just to send an event to all servers in the room.Forse di nuovo libera @sampaiodiego l’ha presa 249 giorni fa e non c’è nessuna pull request aperta. Apertatodo :spiral_notepad: type: feature
RocketChat/homeserver#342 · 4 commenti · 1 assegnatario ·
-
this may not be the best place to do this validationForse di nuovo libera @sampaiodiego l’ha presa 326 giorni fa e non c’è nessuna pull request aperta. Apertatodo :spiral_notepad:
RocketChat/homeserver#322 · 1 commento · 1 reazione · 1 assegnatario ·
-
check if all sendEventToAllServersInRoom should be followed by an emitterForse di nuovo libera @ggazzo l’ha presa 359 giorni fa e non c’è nessuna pull request aperta. Apertatodo :spiral_notepad:
RocketChat/homeserver#304 · 1 assegnatario ·
Tutte le issue di RocketChat/homeserver
Issue simili
-
Bug: Broken RTL / BiDi text rendering when mixing Persian (Farsi) with English or numbersForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
amosblomqvist/learnharness#758 ·
I maintainer di solito rispondono entro 2 giorni
-
Change WorkspacesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dsh-market/dsh-market#1210 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
trustjonathan/STUDY-HUB#13 ·