https://github.com/stemil23/hono-edgedb-cloudflare-starter
Starter for Hono & EdgeDB using edgeql-js and EdgeDB generated TypeScript interfaces
https://github.com/stemil23/hono-edgedb-cloudflare-starter
Last synced: 6 months ago
JSON representation
Starter for Hono & EdgeDB using edgeql-js and EdgeDB generated TypeScript interfaces
- Host: GitHub
- URL: https://github.com/stemil23/hono-edgedb-cloudflare-starter
- Owner: stemil23
- Created: 2024-09-06T04:09:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-10T02:19:58.000Z (almost 2 years ago)
- Last Synced: 2024-11-09T07:42:01.490Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 46.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# EdgeDB, Hono, and Cloudflare Project
This project uses EdgeDB as the database, Hono as the web framework, and Cloudflare for deployment and edge computing capabilities.
- https://hono.dev
- https://docs.edgedb.com/libraries/js
- https://developers.cloudflare.com/workers/
## Prerequisites
- Node.js
- EdgeDB
- Cloudflare account (for deployment)
## Setup
1. Clone the repository:
```
git clone https://github.com/stemil23/Hono-EdgeDB-Cloudflare-starter
```
2. Create a `.dev.vars` file in the project root and add your EdgeDB DSN:
```
EDGEDB_DSN=edgedb://edgedb:XCf58cS3v2ftZ6AUyj14hRji@localhost:10701/main
```
You can find your EdgeDB DSN by running:
```
edgedb instance credentials --insecure-dsn
```
3. Install dependencies:
```
npm install
```
4. Set up Cloudflare:
- Create a Cloudflare account if you don't have one
- Install the Cloudflare Wrangler CLI:
```
npm install -g wrangler
```
- Authenticate with Cloudflare:
```
wrangler login
```
## Development
To run the project in development mode:
```
npm run dev
```
## Deployment
To deploy the project:
```
npm run deploy
```
npx @edgedb/generate edgeql-js
npx @edgedb/generate queries
npx @edgedb/generate interfaces