Skip to content

Repository files navigation

Switchboard Fastify Adapter

Fastify helpers for Acurast jobs deployed through Switchboard.

This package is public for GitHub installs during the private beta. It is not published on npmjs.com yet.

Install

npm install github:proof-computer/switchboard-fastify#v0.1.5 fastify
npm install -D typescript tsx @types/node

Use #main only when intentionally testing unreleased changes. npmjs.com publishing is prepared but not active yet.

App

import { serveSwitchboardFastify } from "@proof-computer/switchboard-fastify";

void serveSwitchboardFastify(async (app) => {
  app.get("/", async (_request, reply) => {
    reply.type("text/html");
    return "<h1>Switchboard Fastify</h1><p>ok</p>";
  });
}).catch((error) => {
  console.error(error);
  process.exit(1);
});

For apps that already own their Fastify lifecycle, register the plugin directly with switchboardFastify.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages