moved js examples to within the FastEdge-sdk-js repo#114
Conversation
There was a problem hiding this comment.
Pull request overview
This PR brings multiple JavaScript/TypeScript FastEdge examples into the repository and registers them as workspace packages so they can be built and maintained alongside the SDK/docs.
Changes:
- Add
examples/*to the pnpm workspace. - Add several new example projects (Handlebars invoice, A/B testing, static assets + Hono, MCP server, KV store, geo redirect), each with source + docs.
- Add/refresh generated static-asset manifest files and example documentation/assets.
Reviewed changes
Copilot reviewed 44 out of 56 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds examples/* to the workspace packages list. |
| examples/README.md | Top-level index of the included examples and how to build them. |
| examples/ab-testing/src/index.js | Cookie-based A/B test header injection for a downstream origin. |
| examples/ab-testing/package.json | Example build config and dependencies. |
| examples/ab-testing/README.md | Documentation for the A/B testing example. |
| examples/geo-redirect/src/index.js | Geo header → env-based redirect example. |
| examples/geo-redirect/package.json | Example build config and dependencies. |
| examples/geo-redirect/README.md | Documentation for the geo redirect example. |
| examples/kv-store/tsconfig.json | TypeScript config for KV store example. |
| examples/kv-store/src/utils.ts | Query param validation + formatting helpers. |
| examples/kv-store/src/index.ts | KV store HTTP handler implementation. |
| examples/kv-store/package.json | Example build config and dependencies. |
| examples/kv-store/README.md | Documentation for the KV store example. |
| examples/kv-store/.fastedge/build-config.js | FastEdge build configuration for KV store example. |
| examples/template-invoice/src/index.js | Handlebars invoice rendering example handler. |
| examples/template-invoice/src/htmlTemplate.js | Invoice HTML Handlebars template. |
| examples/template-invoice/src/cssStyles.js | Inline CSS for invoice template. |
| examples/template-invoice/src/logo.js | Inline SVG logo used by the invoice template. |
| examples/template-invoice/package.json | Example build config and dependencies. |
| examples/template-invoice/README.md | Documentation for the invoice template example. |
| examples/template-invoice-ab-testing/src/index.js | Invoice variant selection via A/B test headers. |
| examples/template-invoice-ab-testing/src/htmlTemplate.js | Invoice HTML template with conditional font loading. |
| examples/template-invoice-ab-testing/src/cssStyles.js | CSS generator for font variants. |
| examples/template-invoice-ab-testing/package.json | Example build config and dependencies. |
| examples/template-invoice-ab-testing/README.md | Documentation for the invoice A/B test example. |
| examples/static-assets/tsconfig.json | TypeScript/JSX config for static assets + Hono example. |
| examples/static-assets/templates/index.html | Template file served via embedded static assets. |
| examples/static-assets/styles/index.css | CSS served via embedded static assets. |
| examples/static-assets/src/index.tsx | Hono app wiring + static asset servers. |
| examples/static-assets/src/jsx-page.tsx | JSX-rendered page example for Hono. |
| examples/static-assets/src/images-static-assets.ts | Generated manifest for embedded images. |
| examples/static-assets/src/styles-static-assets.ts | Generated manifest for embedded styles. |
| examples/static-assets/src/templates-static-assets.ts | Generated manifest for embedded templates. |
| examples/static-assets/package.json | Example build scripts for manifests + wasm build. |
| examples/static-assets/README.md | Documentation for static asset manifests/servers. |
| examples/mcp-server/tsconfig.json | TypeScript config for MCP server example. |
| examples/mcp-server/src/types.ts | Types for NWS API responses. |
| examples/mcp-server/src/server.ts | MCP server tool registration + NWS fetch logic. |
| examples/mcp-server/src/index.ts | Hono route exposing MCP server over HTTP transport. |
| examples/mcp-server/package.json | MCP server example packaging + build scripts. |
| examples/mcp-server/README.md | Step-by-step documentation for building/running the MCP server example. |
| examples/mcp-server/LICENSE | Licensing for the MCP example and upstream-derived portions. |
| examples/mcp-server/.gitignore | Ignores build output, wasm, node_modules, etc. |
| examples/mcp-server/images/mcp.jpg | Documentation image asset. |
| examples/mcp-server/images/github-settings.jpg | Documentation image asset. |
| examples/mcp-server/images/agent-mode.jpg | Documentation image asset. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
529acb4 to
4d9b58d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 47 out of 59 changed files in this pull request and generated 5 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| <a href='https://github.com/G-Core/FastEdge-examples/tree/main/javascript' target='_blank'> | ||
| examples-repo | ||
| <a href='https://github.com/G-Core/FastEdge-sdk-js/tree/main/examples' target='_blank'> |
There was a problem hiding this comment.
This external link uses target='_blank' without rel='noopener noreferrer', which enables reverse-tabnabbing via window.opener. Add rel='noopener noreferrer' to the anchor.
| <a href='https://github.com/G-Core/FastEdge-sdk-js/tree/main/examples' target='_blank'> | |
| <a href='https://github.com/G-Core/FastEdge-sdk-js/tree/main/examples' target='_blank' rel='noopener noreferrer'> |
4d9b58d to
9f35d5c
Compare
examples and docs updated to reflect changes
9f35d5c to
719ef24
Compare
No description provided.