Skip to content

Commit

Permalink
Introduce Cloudflare Workers (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans authored Oct 23, 2023
1 parent 70a6651 commit 271bab2
Show file tree
Hide file tree
Showing 81 changed files with 9,745 additions and 887 deletions.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: Swatinem/rust-cache@v2

- run: cargo build --release
working-directory: server

- name: Docker meta
id: meta
Expand Down Expand Up @@ -52,8 +53,8 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
file: .github/.deploy/Dockerfile
context: .
file: .github/.docker/Dockerfile
context: server
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/v3xlabs/enstate:edge
Expand Down
3 changes: 0 additions & 3 deletions .gitignore

This file was deleted.

26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,25 @@ services:
- 6379:6379
```
## 🛣️ Roadmap
### 🦀 Cloudflare Worker
- Dockerize ✅
- Internal Batching 👨‍🔧
- Batching endpoints 👨‍🔧
- TTL Specification 🔜
Running the cloudflare worker is as easy as running the following command:
Additionally, there is a hosted instance available at [worker.enstate.rs](https://worker.enstate.rs).
```sh
cd worker && pnpx wrangler deploy
```

## Contributing

### Standalone Server

```sh
cargo run -p enstate
```

### Cloudflare Worker

```sh
cd worker && pnpm dev
```
File renamed without changes.
4 changes: 4 additions & 0 deletions server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
.wrangler
target/
.env
Loading

0 comments on commit 271bab2

Please sign in to comment.