mirror of
https://github.com/Neur0toxine/whprintf.git
synced 2024-12-04 19:06:05 +03:00
23 lines
303 B
Go
23 lines
303 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
"net/http"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
go processSignals()
|
||
|
addr := ":8080"
|
||
|
|
||
|
if len(os.Args) > 1 {
|
||
|
addr = os.Args[1]
|
||
|
}
|
||
|
|
||
|
log.Printf("Listening %s...\n\n", addr)
|
||
|
err := http.ListenAndServe(addr, NewHandler())
|
||
|
if err != nil {
|
||
|
log.Fatal(err)
|
||
|
}
|
||
|
}
|