import { json } from '@sveltejs/kit'; import jwt from 'jsonwebtoken'; export async function POST() { const token = await jwt.sign( { id: 'sample-id', secret: 'secret' }, 'shhhhh' ); return json({ token }); }