diff --git a/packages/website/src/pages/api/meta.json.ts b/packages/website/src/pages/api/meta.json.ts new file mode 100644 index 000000000..cd1e023e9 --- /dev/null +++ b/packages/website/src/pages/api/meta.json.ts @@ -0,0 +1,13 @@ +import type { APIRoute } from 'astro'; +import packageJSON from '../../../../../package.json'; + +/** + * Returns information on the current build of BlitzKit like the version + * number, date of compilation, the game version used, etc. + * + * @todo Add more meta data. + * @returns JSON. + */ +export const GET: APIRoute = async () => { + return Response.json({ version: packageJSON.version }); +};