get very simple webserver up and running

This commit is contained in:
2026-07-31 12:38:56 -07:00
parent 760dbec077
commit e8b422e390
3 changed files with 18 additions and 1 deletions
+9
View File
@@ -1,13 +1,22 @@
package main
import (
"net/http"
"astraltech.xyz/calendar/v2/webserver"
)
func LoginHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
var test_html string = "Hello, world"
w.Write([]byte(test_html))
}
func main() {
read_config()
init_dav_client()
webserver.ServeWebpage("/login", LoginHandler)
webserver.ServeWebserver()
// calDavData := get_caldav_data(serverConfig.Username, serverConfig.Password)