Skip to content

Commit

Permalink
Merge pull request #214 from sejori/example-architecture
Browse files Browse the repository at this point in the history
fix: wrangler script
  • Loading branch information
sejori authored Jul 26, 2024
2 parents 037ce9f + b8ac60c commit 5f75d8a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img
width="270px"
style="margin: 1rem auto;"
src="https://raw.githubusercontent.com/sejori/peko/main/example/preactSSR/assets/twemoji_chick.svg" alt="peko-chick"
src="https://raw.githubusercontent.com/sejori/peko/main/example/reactSSR/assets/twemoji_chick.svg" alt="peko-chick"
/>
</p>

Expand Down Expand Up @@ -104,10 +104,12 @@ Check `example` directory to see implementations of:
- JWT authentication middleware

**Deno [Live Deploy](https://peko.deno.dev)**

- Process 1: `deno task dev:build`
- Process 2: `deno task dev:deno`

**Cloudflare Workers [Live Deploy](https://peko.sejori.workers.dev)**

- `npm i`
- Process 1: `npm run dev:build`
- Process 2: `npm run dev:wrangler`
Expand Down Expand Up @@ -236,11 +238,11 @@ PR to add your project 🙌

### Apps on the edge

The modern JavaScript edge rocks because the client-server gap practically disappears. We can share modules across the client and cloud.
The modern JavaScript edge rocks because the client-server gap practically disappears. We can share modules across the client and cloud.

This eliminates much of the bloat in traditional JS server-side systems, increasing project simplicity while making our software faster and more efficient.

This is made possible by engines such as Cloudflare Workers, Deno and Bun that are built to the [ECMAScript](https://tc39.es/) specification</a>.
This is made possible by engines such as Cloudflare Workers, Deno and Bun that are built to the [ECMAScript](https://tc39.es/) specification</a>.

If you are interested in contributing please submit a PR or get in contact ^^

Expand Down
5 changes: 2 additions & 3 deletions scripts/bun/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { RequestContext } from "../../mod.ts";
import router from "../../example/preactSSR/router.ts";
import router from "../../example/reactSSR/router.ts";

declare global {
interface Process {
Expand All @@ -16,7 +15,7 @@ declare global {
}
}

router.middleware.unshift((ctx: RequestContext<{ env?: unknown }>) => {
router.middleware.unshift((ctx) => {
ctx.state.env = process.env;
});

Expand Down
2 changes: 1 addition & 1 deletion scripts/wrangler/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import router from "../../example/preactSSR/router.ts";
import router from "../../example/reactSSR/router.ts";

export default {
fetch(request: Request, env: Record<string, string>) {
Expand Down

0 comments on commit 5f75d8a

Please sign in to comment.