A demonstration repo for deploying a full-stack Greenwood app with AWS static hosting and serverless functions.
⚠️ Note: This repo is currently a work in progress
⚠️ Note: Currently this repo is a WIP
To run locally
- Clone the repo
- Run
npm ci
You can now run these npm scripts locally:
npm run dev
- Start the demo with Greenwood local dev servernpm run serve
- Start the demo with a production Greenwood build
This repo aims to demonstrate a couple of Greenwood's features (API Routes and SSR pages) leveraging Netlify's serverless and edge function capabilities, focused on using Web Components (WCC) and Web Standards to deliver the content for the demo.
Feature | Greenwood | Workers |
---|---|---|
API Routes | ✅ | |
SSR Pages | ✅ |
You can see the live demo at https://greenwood-demo-adapter-cloudflare.pages.dev/.
The demos include the following examples:
⚠️ /api/greeting?name{xxx}
- An API that returns a JSON response and optionally uses thename
query param for customization. Otherwise returns a default message.⚠️ /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.
⚠️ /products/
- SSR page for rendering Greenwood pages.