docs: Make explicit that you have to create lib/stack.ts

This commit is contained in:
Stan Wohlwend 2024-03-07 20:44:47 +01:00
parent 2c68b86c90
commit aba1227808
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ npm install @stackframe/stack
STACK_SECRET_SERVER_KEY=<your-secret-server-key>
```
2. Create `StackServerApp` in `@lib/stack.ts`:
2. Create a new file in `lib/stack.ts` and fill it with the following:
```tsx
import "server-only";

View File

@ -34,7 +34,7 @@ On Server Components, you don't need `useStackApp()`. Instead, you can just impo
```tsx
import "server-only";
import { stackApp } from "lib/stack";
import { stackApp } from "@/lib/stack";
export default async function MyComponent() {
const user = await stackApp.getUser();