add fileserving

This commit is contained in:
Thilo Karraß 2023-02-19 21:13:19 +01:00
parent 6cff73dc0d
commit 15e2ff811b
3 changed files with 11 additions and 0 deletions

BIN
lemserv

Binary file not shown.

View File

@ -6,6 +6,7 @@ import (
)
func main() {
http.Handle("/", http.FileServer(http.Dir("./wwwdata/")))
http.HandleFunc("/mything", handleSomething)
if err := http.ListenAndServe(":8088", nil); err != http.ErrServerClosed {
fmt.Printf("Ouch, server closed: %v\n", err)

10
wwwdata/index.html Normal file
View File

@ -0,0 +1,10 @@
<!doctype html>
<html>
<head>
<title>bla</title>
</head>
<body>
<h3>tut</h3>
<script>alert('blubb');</script>
</body>
</html>