Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graceful-server-elysia

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graceful-server-elysia

Library inspired by [graceful-server](https://github.com/gquittet/graceful-server).

  • 1.0.21
  • npm
  • Socket score

Version published
Weekly downloads
71
decreased by-21.11%
Maintainers
0
Weekly downloads
 
Created
Source

graceful-server-elysia

Library inspired by graceful-server.

Usage

import { pluginGracefulServer } from 'graceful-server-elysia';

export const app = new Elysia()
  .use(pluginGracefulServer({}))

Plugin options

namedefaultdescription
livenessEndpoint/liveRespond 200 with the uptime of the server in second.
readinessEndpoint/readyRespond 200 if the server is ready or respond 500
serverIsReadyOnStartfalseSet server is ready on Elysia emit start event
closePromises[]Call every promises when server is closing
onStart() => {}Callback is called when server is started
onReady() => {}Callback is called when server is ready
onShuttingDown() => {}Callback is called when server is shutting down
onShutdown() => {}Callback is called when server is shutdown

Tests

To execute jest tests (all errors, type integrity test)

bun test

FAQs

Package last updated on 02 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc