client/web: add barebones vite dev setup

Currently just serving a "Hello world" page when running the web
cli in --dev mode.

Updates tailscale/corp#13775

Co-authored-by: Will Norris <will@tailscale.com>
Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
Sonia Appasamy
2023-08-10 13:58:59 -04:00
committed by Sonia Appasamy
parent 215480a022
commit 16bc9350e3
10 changed files with 1916 additions and 8 deletions

View File

@@ -35,7 +35,8 @@ func main() {
}
// Serve the Tailscale web client.
ws := web.NewServer(*devMode, lc)
ws, cleanup := web.NewServer(*devMode, lc)
defer cleanup()
if err := http.Serve(ln, ws); err != nil {
if err != http.ErrServerClosed {
log.Fatal(err)