Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idan003/hono-starter-worker
hono rest api for cloudflare worker and d1
https://github.com/idan003/hono-starter-worker
cloudflare cloudflare-workers drizzle-orm honojs typescript workers
Last synced: 11 days ago
JSON representation
hono rest api for cloudflare worker and d1
- Host: GitHub
- URL: https://github.com/idan003/hono-starter-worker
- Owner: idan003
- License: mit
- Created: 2024-08-15T21:52:06.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-16T13:52:41.000Z (4 months ago)
- Last Synced: 2024-11-01T15:52:15.936Z (about 2 months ago)
- Topics: cloudflare, cloudflare-workers, drizzle-orm, honojs, typescript, workers
- Language: TypeScript
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hono Starter
A hono starter for REST API, with drrizle orm and deploy to worker cloudflare.
## Stack
- Authentication: JWT
- Validation: Zod
- ORM: Drizzle
- DB: D1
- Framework: Hono
- Formatter: Prettier
- Language: TypeScript
- Package Manager: Bun## Install dependencies
```bash
bun install
```## Run the app
the config you can found on `wrangler.toml`.
all the VARS or D1 configuration you will found there```bash
bun dev
``````bash
open http://localhost:8787
```## Important
for run D1 local you need to run the commands:```bash
bun db:generate
``````bash
wrangler d1 execute --local --file=./src/db/migrations/0000_short_lockheed.sql
```## Deployment to Worker (Cloudflare PROD)
```bash
bun run deploy
```D1:
```bash
bun db:push
```## Migration
### Generate
```bash
bun db:generate
```### Migrate
```bash
bun db:migrate
```### Drop
```bash
bun db:drop
```## License
MIT