https://github.com/pphatdev/node-with-cloudflare
🫡 Just Cooking Some APIs Free hosting on Cloudflare
https://github.com/pphatdev/node-with-cloudflare
cloudflare drizzle-orm honojs nodejs typescript
Last synced: 7 months ago
JSON representation
🫡 Just Cooking Some APIs Free hosting on Cloudflare
- Host: GitHub
- URL: https://github.com/pphatdev/node-with-cloudflare
- Owner: pphatdev
- Created: 2025-05-15T04:40:09.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-07-21T01:28:24.000Z (7 months ago)
- Last Synced: 2025-07-21T03:22:17.759Z (7 months ago)
- Topics: cloudflare, drizzle-orm, honojs, nodejs, typescript
- Language: TypeScript
- Homepage: https://api.pphatdev.workers.dev
- Size: 103 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-with-cloudflare
A testing Cloudflare Worker API built with TypeScript, Hono, and Drizzle ORM for managing projects.
## Features
- RESTful API for project management (CRUD)
- TypeScript for type safety
- Hono framework for routing
- Drizzle ORM for database access
- Cloudflare Worker deployment via Wrangler
## Project Structure
```
src/
controllers/ # API logic
db/ # Database schema and setup
libs/ # Utilities
middlewares/ # Middleware (e.g., Drizzle ORM)
routes/ # API and web routes
types/ # Type definitions
drizzle/ # SQL migrations and metadata
```
## API Endpoints
- `GET /api/projects` — List projects (pagination, search, sort)
- `POST /api/projects` — Create a new project
- `PATCH /api/projects/:id` — Update a project
- `DELETE /api/projects/:id` — Delete a project
- `POST /api/setup` — Initialize database
## Getting Started
### Prerequisites
- Node.js
- Wrangler CLI (`npm install -g wrangler`)
- SQLite (for local development)
### Install dependencies
```bash
npm install
```
### Development
```bash
npm run dev
```
### Build
```bash
npm run build
```
### Deploy
```bash
npm run deploy
```
## Configuration
- `wrangler.toml` — Cloudflare Worker settings
- `drizzle.config.ts` — Drizzle ORM config
- `tsconfig.json` — TypeScript config
## License
MIT