mirror of
https://github.com/rjNemo/go-wiki
synced 2026-06-10 04:26:40 +00:00
21 lines
366 B
Go
21 lines
366 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"net/http"
|
|
"time"
|
|
|
|
"github.com/rjNemo/go-wiki/controller"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Printf("Start Go-wiki server on http://localhost:%s at %s\n", controller.Port, time.Now())
|
|
startServer(controller.Port)
|
|
}
|
|
|
|
func startServer(p string) {
|
|
port := ":" + p
|
|
controller.RegisteredRoutes()
|
|
log.Fatal(http.ListenAndServe(port, nil))
|
|
}
|