Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thescientist13/greenwood-bun
A demonstration repo of using Greenwood with Bun
https://github.com/thescientist13/greenwood-bun
Last synced: about 1 month ago
JSON representation
A demonstration repo of using Greenwood with Bun
- Host: GitHub
- URL: https://github.com/thescientist13/greenwood-bun
- Owner: thescientist13
- Created: 2024-10-11T22:25:23.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-11-09T00:42:31.000Z (about 1 month ago)
- Last Synced: 2024-11-09T01:27:06.628Z (about 1 month ago)
- Language: JavaScript
- Size: 95.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# greenwood-bun
A demonstration repo of using Greenwood with Bun.
## Setup
To run locally
1. Install Bun >= `1.x`
1. Clone the repo
1. Run `bun install`You can now run these npm scripts
- `bun dev` - Start the demo with Greenwood local dev server
- `bun start` - Start the demo with a production Greenwood build## Demo
This repo aims to demonstrate a couple of Greenwood's features ([API Routes](https://www.greenwoodjs.io/docs/api-routes/) and [SSR pages](https://www.greenwoodjs.io/docs/server-rendering/#routes)) focused on using Web Components (WCC) and Web Standards to deliver the content for the demo.
### API Routes
- ✅ `/api/greeting?name{xxx}` - An API that returns a JSON response and optionally uses the `name` 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.### SSR Pages
- ✅ `/products/` - SSR page for rendering Greenwood pages.