Home / File/ [slug].json.ts — astro Source File

[slug].json.ts — astro Source File

Architecture documentation for [slug].json.ts, a typescript file in the astro codebase.

Entity Profile

Relationship Graph

Source Code

export async function getStaticPaths() {
    return [
        { params: { slug: 'thing1' }},
        { params: { slug: 'thing2' }}
    ]
}

export async function GET({ params }) {
    return Response.json({
        slug: params.slug,
        name: 'Astro Technology Company',
        url: 'https://astro.build/'
    });
}

Subdomains

Frequently Asked Questions

What does [slug].json.ts do?
[slug].json.ts is a source file in the astro codebase, written in typescript. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in [slug].json.ts?
[slug].json.ts defines 2 function(s): GET, getStaticPaths.
Where is [slug].json.ts in the architecture?
[slug].json.ts is located at packages/astro/test/fixtures/static-build/src/pages/data/[slug].json.ts (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test/fixtures/static-build/src/pages/data).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free