Attach all handlers for an ApiImplementation to any existing Fastify server.
import fastify from 'fastify';import {attachApi} from '@rest-vir/host';const server = fastify();await attachApi(server, myApiImplementation, { externalOrigin: 'http://localhost:3000',});await server.listen({port: 3000}); Copy
import fastify from 'fastify';import {attachApi} from '@rest-vir/host';const server = fastify();await attachApi(server, myApiImplementation, { externalOrigin: 'http://localhost:3000',});await server.listen({port: 3000});
@rest-vir/host
Attach all handlers for an ApiImplementation to any existing Fastify server.