dynamic-web

command module
v0.0.0-...-0b3df3a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 3 Imported by: 0

README

Go Dynamic Web Sample

Description

This sample project is a basic Go web server with server side rendered html. Dynamic components are enabled via html fragments sent over a websocket. On the client side the dom is updated via morphdom.

This approach is similar to Phoenix LiveView, Hotwire, and others.

Tailwind CSS is used for the basic styling and esbuild for bundling.

Running Sample

Start tailwind watcher.

npm run tailwind

Run esbuild to bundle javascript

npm run esbuild

Run go server

go run main.go

If you visit http://localhost:8080 you will see a timestamp that updates every second and the live number of connections. Open another instance in a different tab to see the connection count go up. image

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL