Neon’s Context.dev template includes web search and scraping, with optional Answers, Brand Retrieval, and News Search routes. Extend the generated function to call any other Context API.
This creates functions/contextdev/index.ts and adds it to neon.ts. The default routes are /web-search and /web-scrape.To include all five routes, use this command instead when creating the function:
neon functions new context-dev --all-operations --yes
Generate CONTEXT_FUNCTION_TOKEN with openssl rand -hex 32. It must be at least 32 characters.
The API key lets the function call Context.dev; the caller token controls access to your function. Keep both server-side and add .env.local to .gitignore.
Review neon.ts, then deploy to the linked branch with both secrets:
neon deploy --env .env.local --no-env-pull
This applies all services declared in neon.ts to the linked branch. Replace http://localhost:3001 in the request above with the printed function URL, keeping /web-search and the bearer header.