2015-01-14 20:29:04 +01:00
|
|
|
package main
|
|
|
|
|
2015-01-26 02:15:18 +01:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/codegangsta/cli"
|
|
|
|
"github.com/minio-io/minio/pkg/server"
|
|
|
|
)
|
|
|
|
|
|
|
|
func parseInput(c *cli.Context) {
|
|
|
|
tls := c.Bool("tls")
|
|
|
|
certFile := c.String("cert")
|
|
|
|
keyFile := c.String("key")
|
2015-01-28 02:47:11 +01:00
|
|
|
inmemory := c.Bool("inmemory")
|
|
|
|
server.Start(":8080", tls, certFile, keyFile, inmemory)
|
2015-01-26 02:15:18 +01:00
|
|
|
}
|
2015-01-18 22:31:22 +01:00
|
|
|
|
2015-01-14 20:29:04 +01:00
|
|
|
func main() {
|
2015-01-26 02:15:18 +01:00
|
|
|
app := cli.NewApp()
|
|
|
|
app.Name = "minio"
|
|
|
|
app.Usage = "Minio Server"
|
|
|
|
var flags = []cli.Flag{
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "tls",
|
|
|
|
Usage: "Enable tls",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "cert",
|
|
|
|
Value: "",
|
|
|
|
Usage: "cert file path",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "key",
|
|
|
|
Value: "",
|
|
|
|
Usage: "key file path",
|
|
|
|
},
|
2015-01-28 02:47:11 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "inmemory",
|
|
|
|
Usage: "in memory storage",
|
|
|
|
},
|
2015-01-26 02:15:18 +01:00
|
|
|
}
|
|
|
|
app.Flags = flags
|
|
|
|
app.Action = parseInput
|
|
|
|
app.Author = "Minio"
|
|
|
|
app.Run(os.Args)
|
2015-01-14 20:29:04 +01:00
|
|
|
}
|