arecibo
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    arecibo-logo-v1

    NPM version NPM downloads styled with prettier Known Vulnerabilities

    Installation

    Note: Arecibo version 1.x.x supports version 2.x.x of Fastify. Arecibo version 2.x.x supports version 3.x.x of Fastify.

    npm i arecibo

    Usage in Node.js

    const arecibo = require('arecibo')
    // or import arecibo from 'arecibo'
    // or import * as arecibo from 'arecibo'
     
    fastify.register(arecibo, {
      message: 'Put here your custom message', // optional, default to original arecibo message
      readinessURL: '/put/here/your/custom/url', // optional, deafult to /arecibo/readiness
      livenessURL: '/put/here/your/custom/url', // optional, deafult to /arecibo/liveness
      readinessCallback: (req, reply) => reply.type('text/html').send('Put here your custom message'), // optional
      livenessCallback: (req, reply) => reply.type('text/html').send('Put here your custom message'), // optional
      logLevel: 'error', // optional, defaults to 'info'; can be trace, debug, info, warn, error, and fatal
    })
     

    Note for typescript users

    If you set "esModuleInterop": true you must import this module using import arecibo from 'arecibo'.

    On Kubernetes add deployment manifest

    ...
     
    livenessProbe:
      httpGet:
        path: /arecibo/liveness
        port: 80
        httpHeaders:
          name: X-Custom-Header
            value: Awesome
      initialDelaySeconds: 15
      timeoutSeconds: 1
      periodSeconds: 15
    readinessProbe:
      httpGet:
        path: /arecibo/readiness
        port: 80
        httpHeaders:
          name: X-Custom-Header
            value: Awesome
      initialDelaySeconds: 5
      timeoutSeconds: 1
      periodSeconds: 15
     
    ...

    Reference

    Fun fact: where does the name come from?

    The name is inspired by the Arecibo message, a 1974 interstellar radio message carrying basic information about humanity and Earth sent to globular star cluster M13 in the hope that extraterrestrial intelligence might receive and decipher it. The message was broadcast into space a single time via frequency modulated radio waves at a ceremony to mark the remodelling of the Arecibo radio telescope in Puerto Rico on 16 November 1974.

    Install

    npm i arecibo

    DownloadsWeekly Downloads

    1,257

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    12.2 kB

    Total Files

    10

    Last publish

    Collaborators

    • fox1t
    • tehkapa