@talak-web3/handlers
v1.0.11
Published
Request handlers for various frameworks (Express, Fastify, Hono, Next.js).
Downloads
59
Readme
@talak-web3/handlers
Request handlers for various frameworks (Express, Fastify, Hono, Next.js).
Installation
npm install @talak-web3/handlers
yarn add @talak-web3/handlers
pnpm add @talak-web3/handlersExpress
import { createAuthRouter } from '@talak-web3/handlers/express';
import express from 'express';
const app = express();
app.use('/auth', createAuthRouter({
domain: 'myapp.com',
secret: process.env.JWT_SECRET,
}));Hono
import { createAuthApp } from '@talak-web3/handlers/hono';
import { Hono } from 'hono';
const app = new Hono();
app.route('/auth', createAuthApp({
domain: 'myapp.com',
secret: process.env.JWT_SECRET,
}));Next.js
import { createAuthHandler } from '@talak-web3/handlers/nextjs';
export default createAuthHandler({
domain: 'myapp.com',
secret: process.env.JWT_SECRET,
});License
MIT
