Skip to content

j-grosse/lit-app

Repository files navigation

About

This app is a Voltmeter web component made with LitElement. It uses the ws Websocket library and is styled with vanilla css.

image.png

The project is based on the LitElement TypeScript starter template from the lit-starter-ts package in the main Lit repo.

Setup

Install dependencies:

npm i

Build

To build the JavaScript version of your component and watch files and rebuild when the files are modified, run the following command:

npm run build:watch

Node Websocket Server

To run the node server that sends and receives websocket messages to and from the voltmeter:

node server.js

Dev Server

To run the dev server and open the project in a new browser tab:

npm run serve