GET() — astro Function Reference
Architecture documentation for the GET() function in test-old-api.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD b1c231bb_6007_5000_3b0b_a8e96a90d936["GET()"] 47832d5b_0226_360e_5953_b95adc492fda["test-old-api.ts"] b1c231bb_6007_5000_3b0b_a8e96a90d936 -->|defined in| 47832d5b_0226_360e_5953_b95adc492fda style b1c231bb_6007_5000_3b0b_a8e96a90d936 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/test/fixtures/live-loaders/src/pages/test-old-api.ts lines 6–21
export const GET: APIRoute = async () => {
try {
// @ts-ignore This should throw an error because liveStuff is a live collection
const collection = await getCollection('liveStuff');
return Response.json({ collection });
} catch (error: any) {
return Response.json(
{
error: error.message
},
{
status: 500,
},
);
}
};
Domain
Subdomains
Source
Frequently Asked Questions
What does GET() do?
GET() is a function in the astro codebase, defined in packages/astro/test/fixtures/live-loaders/src/pages/test-old-api.ts.
Where is GET() defined?
GET() is defined in packages/astro/test/fixtures/live-loaders/src/pages/test-old-api.ts at line 6.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free