Skip to content

About

Starter for Fastify + Web Components/Lit Web App. Includes Reload and web server restart on dev mode.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Framework-less Vanilla HTML/JS/CSS SPA Website

SPA Web Components Web App starter. Showcases Lit, which is an awesome tiny html element builder and a game changer for web components. "Web Components is dead" is highly exaggerated and total garbo. It is the future.

  • Frameworkless. Thank the heavens!
  • High Performance. "Performant" is not enough.
  • Low Maintenance. No chasing low value framework updates.
  • Consistent builds. No difference between dev and prod except compression/etc.
  • Server and client reloads on changes.
  • Flexible. Bring your own html element builder, router, test framework, web server and whatever you want.
  • Typescript enabled.

Getting Started

To install npm i or yarn install

To run: npm run dev or yarn build

VSCode has a lit-plugin extension.

Directories

private - Server side app. Web server.

public - Client side app.

dist/serve - everything here is public.

dist/server - Just run index.js in production.

Production notes

  • A production deployment requires node_modules to be located in dist. That is an easy cp or mv in your build system.

  • For production. You'll have to think about whether you want fastify or nginx (etc.) to serve static content. With the current setup, fastify serves static content only in dev mode.

    • nginx, apache, fastify, etc. can point to "dist/serve" to serve static content. index.html must be served when no match.
    • An example nginx config is provided

About

Starter for Fastify + Web Components/Lit Web App. Includes Reload and web server restart on dev mode.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages