Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/zztkm/go-workers-d1-sqlc


https://github.com/zztkm/go-workers-d1-sqlc

Last synced: 10 days ago
JSON representation

Awesome Lists containing this project

README

        

# workers go d1 sqlc

A Cloudflare Workers example project using Go and WebAssembly.

Libraries and tools used

- [syumai/workers](https://github.com/syumai/workers)
- [go-michi/michi](https://github.com/go-michi/michi)
- [sqlc-dev/sqlc](https://github.com/sqlc-dev/sqlc)

## Requirements

- Node.js
- [wrangler](https://developers.cloudflare.com/workers/wrangler/)
- just run `npm install -g wrangler`
- Go 1.22 or later
- [sqlc](https://github.com/sqlc-dev/sqlc)

## Development

### Getting Started

```bash
cp example.wrangler.toml wrangler.toml

# create d1 database
make create-db

# initialize d1 local database
make init-db-local

# edit wrangler.toml

# run dev server
make dev
```

### Commands

```
make create-db # create d1 database
make dev # run dev server
make build # build Go Wasm binary
make deploy # deploy worker
```