astro/examples/non-html-pages/src/pages/about.json.ts
2022-02-25 08:29:23 -08:00

11 lines
272 B
TypeScript

// Returns the file body for this non-HTML file.
// The content type is based off of the extension in the filename,
// in this case: about.json.
export async function get() {
return {
body: JSON.stringify({
name: 'Astro',
url: 'https://astro.build/',
}),
};
}