Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
874d665266 | ||
|
|
ede76f3dbd |
@@ -0,0 +1 @@
|
||||
*.test
|
||||
+1
-1
@@ -6,7 +6,7 @@ A file describing tech stack / feature decisions. sort of a change log
|
||||
|
||||
| Area | Choice | Reasoning |
|
||||
| ------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Backend | Go | Language I want to learn |
|
||||
| Backend | Go | It's fast. Go compiles to a single native binary, and it compiles fast. It's simple. It's a small language without a ton of feature bloat. It's statically typed. The compiler catches type bugs before your code even runs. Concurrency is built in. Goroutines are very powerful, which is a big reason tools like Docker and Kubernetes are written in Go. |
|
||||
| Web framework | HTMX | Server-side rendering reduces client-side roundtrip complexity; same API calls happen server-side but feels quicker/lighter on the client |
|
||||
| Frontend | HTML/CSS/JS | Standard building blocks, no framework chosen yet |
|
||||
| Database | PostgreSQL | Scales better than SQLite, at the cost of more setup/learning overhead |
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func healthHandler(w http.ResponseWriter, r *http.Request) {
|
||||
io.WriteString(w, "ok")
|
||||
}
|
||||
|
||||
func routes(internalMux *http.ServeMux) {
|
||||
internalMux.HandleFunc("/health", healthHandler)
|
||||
}
|
||||
|
||||
func main() {
|
||||
backslashMux := http.NewServeMux()
|
||||
routes(backslashMux)
|
||||
log.Fatal(http.ListenAndServe(":8080", backslashMux))
|
||||
}
|
||||
Reference in New Issue
Block a user