An open API service indexing awesome lists of open source software.

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

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).