1.0.9 • Published 7 months ago
@httpi/adapter-hyperexpress v1.0.9
@httpi/adapter-hyperexpress
This is a HyperExpress adapter for @httpi/client.
Install the adapter using one of these:
npm i @httpi/adapter-hyperexpress
yarn add @httpi/adapter-hyperexpress
pnpm i @httpi/adapter-hyperexpress
Example usage
import HyperExpress from 'hyper-express';
import { createEvents } from '@httpi/client';
import { createHyperExpressAdapter } from '@httpi/adapter-hyperexpress';
const app = new HyperExpress.Server();
app.post(
'/interactions',
createHyperExpressAdapter({
publicKey,
events: createEvents({
commands,
components,
}),
}),
);
app.listen(3000);