Home / File/ [param].json.js — astro Source File

[param].json.js — astro Source File

Architecture documentation for [param].json.js, a javascript file in the astro codebase.

Entity Profile

Relationship Graph

Source Code


export function getStaticPaths() {
	return [
		{
			params: {
				param: 'one'
			}
		},
		{
			params: {
				param: 'two'
			}
		},
	]
}

export function GET({ params, request }) {
	return new Response(
		JSON.stringify({
			param: params.param,
			pathname: new URL(request.url).pathname
		})
	);
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free