Initial Go web server with Web Awesome hello world

This commit is contained in:
Ian Gulliver
2025-12-28 22:09:45 -08:00
commit b508b19dbb
4 changed files with 50 additions and 0 deletions

9
CLAUDE.md Normal file
View File

@@ -0,0 +1,9 @@
- DO NOT add comments to code unless something is *incredibly* subtle
- Use e.g. map[string]bool{} instead of make() wherever possible
- Use all-lowercase log messages
- Prepend log messages with [ERROR] if applicable
- Don't mention claude in commit messages. Keep them to a single, short, descriptive sentence
- Always push after commiting
- Use git add -A so you don't miss files when committing
- Never use go build -- use go run instead
- DO NOT commit unless asked to

3
go.mod Normal file
View File

@@ -0,0 +1,3 @@
module tickets
go 1.25.4

13
main.go Normal file
View File

@@ -0,0 +1,13 @@
package main
import (
"log"
"net/http"
)
func main() {
http.Handle("/", http.FileServer(http.Dir("static")))
log.Println("server starting on :8080")
log.Fatal(http.ListenAndServe(":8080", nil))
}

25
static/index.html Normal file
View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tickets App</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3/dist-cdn/styles/themes/default.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3/dist-cdn/webawesome.loader.js"></script>
<style>
body {
font-family: var(--wa-font-sans);
max-width: 800px;
margin: 0 auto;
padding: 2rem;
}
</style>
</head>
<body>
<wa-card>
<h1 slot="header">Hello World</h1>
<p>Welcome to the Tickets App!</p>
<wa-button variant="brand">Get Started</wa-button>
</wa-card>
</body>
</html>