6- Update your enviroment vairables to include these keys
7 - Notion Integration API Key: `NOTION_API_KEY`
8 - [Coffee Journal Database ID](https://developers.notion.com/reference/retrieve-a-database): `COFFEE_TABLE_DB_ID`
2import { readFile, servePublicFile } from "https://esm.town/v/stevekrouse/utils@187-main/serve-public/index.ts";
3import { Hono } from "npm:hono";
4import { insertWebhook } from "./database/queries.ts";
5
6const app = new Hono();
116 const url = new URL(request.url);
117
118 // Mock product manual database
119 const manuals: Record<string, string> = {
120 "PHONE001": "https://example.com/phone-manual.pdf",
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {
7The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/components/App.tsx`.
8
9[React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a fuller featured example project, with a SQLite database table, queries, client-side CSS and a favicon, and some shared code that runs on both client and server.
9- The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/components/App.tsx`.
10
11[React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a fuller featured example project, with a SQLite database table, queries, client-side CSS and a favicon, and some shared code that runs on both client and server.
5 * For this reason, we need to manually create the users table.
6 */
7export const migrateDatabase = async () => {
8 await sqlite.execute(`
9CREATE TABLE IF NOT EXISTS \`users\` (
1import type { LibSQLDatabase } from "../deps/drizzle.ts";
2import type * as schema from "./schema";
3
4export type DBType = LibSQLDatabase<typeof schema>;
13## A Few Honkin' Notes
14
15### database migrations need love and care 🫂
16
17Not totally sure how to generate and apply drizzle migrations yet!