@neuronsearchlab/nextjs
v0.1.5
Published
Server-first NeuronSearchLab SDK for Next.js
Downloads
105
Readme
@neuronsearchlab/nextjs
Server-first Next.js bindings for NeuronSearchLab. OAuth client secrets are read only by the server entry point; browser events pass through a Route Handler.
// app/api/nsl/events/route.ts
import { createEventRoute } from '@neuronsearchlab/nextjs/server';
export const POST = createEventRoute();import { nsl } from '@neuronsearchlab/nextjs/server';
const result = await nsl.recommend({ userId: 'visitor-1', context: 'homepage', limit: 10 });Vercel Marketplace injects the API/OAuth values plus the default context and event IDs used to support every deployed Core API version. Never rename a secret to NEXT_PUBLIC_*.
