mirror of
https://github.com/donl/gPanel.git
synced 2026-05-31 14:22:14 -06:00
25 lines
632 B
Go
25 lines
632 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
|
|
"github.com/Ennovar/gPanel/pkg/public"
|
|
"github.com/Ennovar/gPanel/pkg/webhost"
|
|
"github.com/gorilla/context"
|
|
)
|
|
|
|
func main() {
|
|
webhost := webhost.NewPrivateHost()
|
|
public := public.NewPublicWeb()
|
|
|
|
log.Printf("To Exit: CTRL+C")
|
|
|
|
go func() {
|
|
log.Print("Listening (private) on localhost:2082, serving out of the document_roots/webhost/ directory...")
|
|
http.ListenAndServe("localhost:2082", context.ClearHandler(&webhost))
|
|
}()
|
|
|
|
log.Print("Listening (public) on localhost:3000, serving out of the document_roots/public/ directory...")
|
|
http.ListenAndServe("localhost:3000", &public)
|
|
}
|