This is a project created with the create-honc-app template.
Learn more about the HONC stack on the website or the main repo.
Make sure you have Neon set up and configured with your database. Create a .dev.vars file with the DATABASE_URL key and value (see: .dev.vars.example).
├── src
│ ├── index.ts # Hono app entry point
│ └── db
│ └── schema.ts # Database schema
├── seed.ts # Optional seeding script
├── .dev.vars.example # Example .dev.vars file
├── wrangler.toml # Cloudflare Workers configuration
├── drizzle.config.ts # Drizzle configuration
├── tsconfig.json # TypeScript configuration
└── package.json
Run the migrations and (optionally) seed the database:
# this is a convenience script that runs db:generate, db:migrate, and db:seed
npm run db:setupRun the development server:
npm run devWhen you iterate on the database schema, you'll need to generate a new migration and apply it:
npm run db:generate
npm run db:migrateSet your DATABASE_URL secret (and any other secrets you need) with wrangler:
npx wrangler secret put DATABASE_URLFinally, change the name of the project in wrangler.toml to something appropriate for your project
name = "my-neon-project"Deploy with wrangler:
npm run deploy