Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#### To Do

- [x] Make std output/logs colored and pretty 😅
- [x] Serving html file as output on ```/html/``` endpoint
- [ ] Add Environment Variable to switch text output to html output
- [ ] Serve a html pages from a external directory
- [ ] Add volume Env var to serve volume as http dir
Expand Down
12 changes: 12 additions & 0 deletions html/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple HTTP Server</title>
</head>
<body>
<h1>Welcome to Simple HTTP Server</h1>
<h3>by Paresh Pawar</h3>
</body>
</html>
1 change: 1 addition & 0 deletions simple_http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

func main() {
http.HandleFunc("/", handler)
http.Handle("/html/", http.StripPrefix("/html/", http.FileServer(http.Dir("./html"))))
serverBrand := figure.NewColorFigure("Simple HTTP Server", "straight", "green", true)
serverBrand.Print()
myBrand := figure.NewColorFigure("by PareshPawar.com", "term", "green", true)
Expand Down