22 lines
372 B
Go
22 lines
372 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"log"
|
|
"net/http"
|
|
"sunshine.industries/some-automoderation/routes"
|
|
)
|
|
|
|
func main() {
|
|
var port int
|
|
flag.IntVar(&port, "port", 8080, "Port on which the server should start")
|
|
flag.Parse()
|
|
|
|
fmt.Printf("Server will start on port %d\n", port)
|
|
|
|
routes.RegisterRoutes()
|
|
|
|
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
|
|
}
|