start-server-core

Provide a server-side runtime for TanStack Start with request handling and session management.

14.9k|1.8k|Updated Jan 14, 2019
One-click install
npx skills add https://github.com/TanStack/router --skill start-server-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: start-server-core
Source: https://github.com/TanStack/router/tree/main/packages/start-server-core/skills/start-server-core
Command: npx skills add https://github.com/TanStack/router --skill start-server-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Solves the lack of a cohesive server-side runtime for TanStack Start by providing a dedicated request/response toolkit and session management.

Core Features & Use Cases

  • Server-side runtime for TanStack Start with createStartHandler integration
  • Request/response utilities: getRequest, setResponseHeader, setCookie, getCookie, useSession
  • Three-phase request handling: server functions dispatch, server routes, and app SSR
  • AsyncLocalStorage context to propagate per-request data

Quick Start

Install and wire the server-side runtime in your TanStack Start app by configuring a server entry with createStartHandler.

Frequently Asked Questions about start-server-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle server-side requests and sessions in a TanStack Start app?

You can handle server-side requests and sessions in TanStack Start by configuring a dedicated server entry with createStartHandler. This provides request/response utilities like getRequest, setCookie, and useSession to safely manage data within a request lifecycle.

What is the best way to structure SSR and server functions in TanStack Start?

The best way to structure SSR and server functions in TanStack Start is using a three-phase workflow: server function dispatch, server route handling, and app SSR. This approach ensures cohesive server-side runtime execution.

Do I need AsyncLocalStorage to manage request context in TanStack Start?

Yes, you need AsyncLocalStorage context to manage request context in TanStack Start. It is required to safely propagate per-request data across the server function dispatch, route handling, and SSR phases.

Can I set response headers and cookies during server route handling in TanStack Start?

Yes, you can set response headers and cookies during server route handling in TanStack Start. The runtime provides dedicated utilities like setResponseHeader and setCookie to manipulate the response before the app SSR phase.

Why use server-only imports for TanStack Start server functions?

You use server-only imports for TanStack Start server functions to ensure code operates safely within the request lifecycle. Importing server-side runtime packages directly prevents leaking sensitive server logic to the client during the app SSR phase.