19 lines
447 B
Go
19 lines
447 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
"processSupervisor/handlers"
|
|
)
|
|
|
|
func main() {
|
|
fs := http.FileServer(http.Dir("static"))
|
|
http.Handle("/static/", http.StripPrefix("/static/", fs))
|
|
|
|
http.HandleFunc("/taskmanager/htop", handlers.HtopHandler)
|
|
http.HandleFunc("/taskmanager/kill", handlers.KillHandler)
|
|
|
|
log.Println("Listening on http://localhost:8080/taskmanager/htop")
|
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
|
}
|