Start and stop mongod with ps

This commit is contained in:
bel
2020-04-13 00:02:17 +00:00
parent 3a8af0551e
commit b43c8b1f7a
5 changed files with 65 additions and 8 deletions

View File

@@ -3,6 +3,8 @@ package config
import (
"fmt"
"local/args"
"os"
"strings"
)
var (
@@ -17,6 +19,9 @@ func init() {
}
func New() {
if strings.Contains(fmt.Sprint(os.Args), "-test") {
return
}
as := args.NewArgSet()
as.Append(args.INT, "p", "port to listen on", 52222)
as.Append(args.STRING, "d", "dir with public files", "./public")