https://github.com/enhance-dev/fastify-plugin
Build your Fastify app's views with custom elements. Powered by Enhance
https://github.com/enhance-dev/fastify-plugin
custom-elements fastify web-components
Last synced: 2 months ago
JSON representation
Build your Fastify app's views with custom elements. Powered by Enhance
- Host: GitHub
- URL: https://github.com/enhance-dev/fastify-plugin
- Owner: enhance-dev
- Created: 2022-07-20T23:11:36.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-07T18:36:04.000Z (about 2 years ago)
- Last Synced: 2025-08-04T04:03:49.142Z (11 months ago)
- Topics: custom-elements, fastify, web-components
- Language: JavaScript
- Homepage: https://enhance.dev/docs/learn/deployment/fastify
- Size: 4.88 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# `@enhance/fastify-plugin`
Render custom elements with file based routing.
## Setup
Install with `npm install @enhance/fastify-plugin`, and `app.register` per the example below.
```javascript
import Fastify from 'fastify'
import Enhance from '@enhance/fastify-plugin'
const app = Fastify()
app.register(Enhance)
app.listen({ port: 3000 }, console.log)
```
## File based routing
Look at `./app` and `./preview.mjs` in this repo for an example. Learn more at [enhance.dev](https://enhance.dev).