@12deg/billing-fastify
v0.2.2
Published
billing plugin for fastify
Downloads
129
Readme
@12deg/billing-fastify
A Fastify plugin that provides an easy integration of billing.
Installation
Install with npm:
npm install @12deg/billing-fastify
Install with pnpm:
pnpm add --filter "@scope/project" @12deg/billing-fastify
Usage
Register the plugin with your fastify instance in src/index.ts
:
import plugin from "@12deg/billing-fastify";
import Fastify from "fastify";
const start = async () => {
const fastify = await Fastify();
// Register billing-fastify plugin
await fastify.register(plugin);
try {
await fastify.listen({
port: 3000,
host: "0.0.0.0",
});
} catch (error) {
fastify.log.error(error);
}
};
start();