https://github.com/4lch4/elysia-status
A plugin for the Elysia framework that provides status endpoints for the APIs health.
https://github.com/4lch4/elysia-status
Last synced: 3 months ago
JSON representation
A plugin for the Elysia framework that provides status endpoints for the APIs health.
- Host: GitHub
- URL: https://github.com/4lch4/elysia-status
- Owner: 4lch4
- Created: 2023-11-16T20:00:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-16T20:05:57.000Z (over 1 year ago)
- Last Synced: 2025-02-26T17:52:54.601Z (3 months ago)
- Language: TypeScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Elysia Status
This repository is home to a plugin for the [Elysia][0] framework that provides status endpoints for the APIs health.
## Usage
To use the plugin, simply add it like you would any other one with the `.use` function available on an instance of `Elysia`:
```typescript
import { Elysia } from 'elysia'
import { StatusRoutes } from 'elysia-status'const app = new Elysia().use(StatusRoutes('/status'))
app.listen(8080)
console.log('Server is online!')
```The above example will add a prefix of `/status` to the routes but it's an optional value you can remove if you don't want it. The resulting routes will be available at:
- `/status/health`
- `/status/readiness`[0]: https://elysiajs.com