Default to bolt db proper
parent
d650db5206
commit
bdfc1c346b
|
|
@ -1,6 +1,10 @@
|
|||
package config
|
||||
|
||||
import "local/args"
|
||||
import (
|
||||
"io/ioutil"
|
||||
"local/args"
|
||||
"os"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Port int
|
||||
|
|
@ -14,8 +18,14 @@ type Config struct {
|
|||
func New() Config {
|
||||
as := args.NewArgSet()
|
||||
|
||||
f, err := ioutil.TempFile(os.TempDir(), "bolt.db.*")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
f.Close()
|
||||
|
||||
as.Append(args.INT, "p", "port to listen on", 18114)
|
||||
as.Append(args.STRING, "dburi", "database uri", "mongodb://localhost:27017")
|
||||
as.Append(args.STRING, "dburi", "database uri", f.Name())
|
||||
as.Append(args.STRING, "fileprefix", "path prefix for file service", "/__files__")
|
||||
as.Append(args.STRING, "fileroot", "path to file hosting root", "/tmp/")
|
||||
as.Append(args.STRING, "database", "database name to use", "db")
|
||||
|
|
|
|||
Loading…
Reference in New Issue