Fastify Preact Htm Boilerplate screenshot

Fastify Preact Htm Boilerplate

Author Avatar Theme by Lmammino
Updated: 14 Mar 2020
40 Stars

Quickly bootstrap your next web app with Fastify, Preact and htm

Categories

Overview

The fastify-preact-htm-boilerplate is a stack that allows users to quickly prototype web applications using Fastify (API) and Preact (UI) with the htm templating library. It is designed for users who want to create a quick prototype of a web app to gather feedback without investing a lot of time in configuring build toolchains and additional tools.

Features

  • Fastify and Preact as the core technologies for development
  • Easy to set up and get started with sample code in the src directory
  • Dockerfile included for easy distribution and running the project in a container

Installation

To get started, follow these steps:

  1. Run the command:
npm install fastify-preact-htm-boilerplate
  1. Edit the sample code in the src directory:
  • src/ui: for frontend development using Preact + htm
  • src/server: for backend development using Fastify

To start the app, run the following command:

npm start

The app will be available at localhost:3000.

To distribute the app using Docker, follow these steps:

  1. Run the following commands:
docker build -t fastify-preact-htm-boilerplate .
docker run -p 3000:3000 fastify-preact-htm-boilerplate
  1. The app will be available at localhost:3000.

Summary

The fastify-preact-htm-boilerplate is a stack for quickly prototyping web applications using Fastify, Preact, and htm. It allows users to easily set up a development environment and start coding without spending time on configuration. However, it does not provide compilation for production-ready assets, frontend routing libraries, or server-side rendering. Users are responsible for choosing a database to persist data. Contributions are welcome, and the project is licensed under MIT License.