add fileserving
This commit is contained in:
parent
6cff73dc0d
commit
15e2ff811b
|
@ -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
10
wwwdata/index.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>bla</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3>tut</h3>
|
||||
<script>alert('blubb');</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user