Skip to content

Kody is live

Watch the launch video — what Kody is, and why it exists.

← Public packages

@kentcdodds/package-app-kit

Design tokens, PWA install/update, About/version, cache helpers, and optional realtime notes sync for Kody package apps.

app/controllers/version.ts

12 lines · 380 B · TypeScript
import type { BuildAction } from 'remix/router'
import { readRecordedVersion } from '../../src/record-version.ts'
import { routes } from '../routes.ts'

export default {
	async handler() {
		const version = await readRecordedVersion()
		return Response.json(version, {
			headers: { 'cache-control': 'no-store' },
		})
	},
} satisfies BuildAction<'ANY', typeof routes.versionApi>