Skip to content

Commit

Permalink
feature/demo refresh (#1)
Browse files Browse the repository at this point in the history
* demo refresh

* update project name

* .npmrc file

* update wrangler config

* no build command

* restore build command

* revert restore build command

* comment for build command disabling

* refresh README

* update clean script
  • Loading branch information
thescientist13 authored Sep 20, 2024
1 parent 2183f2f commit 34a951c
Show file tree
Hide file tree
Showing 19 changed files with 4,528 additions and 1,715 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.12.1
18.20.2
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# greenwood-demo-adapter-cloudflare

A demonstration repo for using Greenwood with Cloudflare Pages and Edge functions (Workers).
A demonstration repo for using Greenwood with Cloudflare Pages and Workers.

> ⚠️ _**Note**: Currently this repo is a WIP_
A demonstration repo for using Greenwood with Cloudflare Pages and Edge functions for APIs and SSR pages and used in part of crafting the design for [introducing platform "adapters" into Greenwood](https://github.com/ProjectEvergreen/greenwood/issues/1008). It also takes reference from [this repo / presentation](https://github.com/thescientist13/web-components-at-the-edge/) for some earlier prototypes for server rendering Web Components.
A demonstration repo for using Greenwood with Cloudflare Pages and Workers (functions) for APIs and SSR pages and used in part of crafting the design for [introducing platform "adapters" into Greenwood](https://github.com/ProjectEvergreen/greenwood/issues/1008). It also takes reference from [this repo / presentation](https://github.com/thescientist13/web-components-at-the-edge/) for some earlier prototypes for server rendering Web Components.

## Setup

To run locally
1. Clone the repo
1. Run `npm ci`

You can now run these npm scripts
You can now run these npm scripts locally:
- `npm run dev` - Start the demo with Greenwood local dev server
- `npm run serve` - Start the demo with a production Greenwood build

Expand All @@ -22,21 +22,22 @@ This repo aims to demonstrate a couple of Greenwood's features ([API Routes](htt

## Status

|Feature |Greenwood |Edge|
|---------- |----------|----|
|API Routes | | |
|SSR Pages | | |
|Feature |Greenwood |Workers|
|---------- |----------|-------|
|API Routes | | |
|SSR Pages | | |

You can see the live demo at [https://greenwood-demo-adapter-vercel.vercel.app/](https://greenwood-demo-adapter-vercel.vercel.app/).
You can see the live demo at [https://greenwood-demo-adapter-cloudflare.pages.dev/](https://greenwood-demo-adapter-cloudflare.pages.dev/).

## Edge
## Workers

The serverless demos include the following examples:
The demos include the following examples:

### API Routes

TODO
-[`/api/greeting?name{xxx}`](https://greenwood-demo-adapter-vercel.vercel.app/api/greeting) - An API that returns a JSON response and optionally uses the `name` query param for customization. Otherwise returns a default message.
-[`/api/fragment`](https://greenwood-demo-adapter-vercel.vercel.app/api/fragment) - An API for returning fragments of server rendered Web Components as HTML, that are then appended to the DOM. The same card component used in SSR also runs on the client to provide interactivity, like event handling.

## Adapter Implementation Thoughts / Questions
### SSR Pages

TBD
-[`/products/`](https://greenwood-demo-adapter-vercel.vercel.app/products/) - SSR page for rendering Greenwood pages.
Loading

0 comments on commit 34a951c

Please sign in to comment.