Skip to content

Commit

Permalink
feat: add start page on localhost:9090
Browse files Browse the repository at this point in the history
  • Loading branch information
BreCabral committed Sep 8, 2024
1 parent 653e637 commit 7127052
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmd/protocommtester/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
package main

import (
"net/http"
"log"
)

func main() {
panic("")
fs := http.FileServer(http.Dir("templates/"))
http.Handle("/", fs)
log.Println("Server started at localhost:9090")
err := http.ListenAndServe(":9090", nil)
if err != nil {
log.Fatal("ListenAndServe: ", err)
}
}
9 changes: 9 additions & 0 deletions cmd/protocommtester/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<p>Hello World!</p>
</body>
</html>

0 comments on commit 7127052

Please sign in to comment.