Skip to content

Commit 7bb3ebd

Browse files
committed
Create +server.ts
1 parent 4315f7a commit 7bb3ebd

File tree

1 file changed

+18
-0
lines changed
  • apps/svelte.dev/src/routes/llms-full.txt

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { RequestHandler } from './$types';
2+
import { documentsContent, generateCombinedContent } from '$lib/server/content';
3+
4+
const PREFIX = 'This is the full developer documentation for Svelte and SvelteKit.';
5+
6+
export const GET: RequestHandler = async () => {
7+
const content = `${PREFIX}\n\n${generateCombinedContent(documentsContent)}`;
8+
9+
return new Response(content, {
10+
status: 200,
11+
headers: {
12+
'Content-Type': 'text/plain; charset=utf-8',
13+
'Cache-Control': 'public, max-age=3600'
14+
}
15+
});
16+
};
17+
18+
export const prerender = true;

0 commit comments

Comments
 (0)