An open API service indexing awesome lists of open source software.

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

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