mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
20 lines
334 B
Go
20 lines
334 B
Go
package api
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
|
|
"npm/internal/logger"
|
|
)
|
|
|
|
const httpPort = 3000
|
|
|
|
// StartServer creates a http server
|
|
func StartServer() {
|
|
logger.Info("Server starting on port %v", httpPort)
|
|
err := http.ListenAndServe(fmt.Sprintf(":%v", httpPort), NewRouter())
|
|
if err != nil {
|
|
logger.Error("HttpListenError", err)
|
|
}
|
|
}
|