mirror of
https://github.com/shlldev/miniws.git
synced 2025-09-02 19:00:59 +02:00
refactor 2: put miniws code in isolated module in miniws/
This commit is contained in:
12
main.go
12
main.go
@@ -5,17 +5,10 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/akamensky/argparse"
|
||||
)
|
||||
|
||||
const (
|
||||
FILENAME_ACCESSLOG string = "access.log"
|
||||
FILENAME_ERRORLOG string = "error.log"
|
||||
FILENAME_IPFILTER string = "ipfilter.conf"
|
||||
FILENAME_USERAGENTFILTER string = "useragentfilter.conf"
|
||||
"github.com/shlldev/miniws/miniws"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
parser := argparse.NewParser("miniws", "")
|
||||
|
||||
port := parser.Int("p", "port", &argparse.Options{Default: 8040})
|
||||
@@ -30,7 +23,6 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
webserver := NewWebServer(*port, *logFolder, *configFolder)
|
||||
webserver := miniws.NewWebServer(*port, *logFolder, *configFolder)
|
||||
webserver.Run()
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user