-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.go
More file actions
38 lines (33 loc) · 782 Bytes
/
main.go
File metadata and controls
38 lines (33 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
import (
"github.com/codegangsta/cli"
"os"
)
func main() {
app := cli.NewApp()
app.Name = "fireup"
app.Usage = "push markdown slides on the fly."
app.Commands = []cli.Command{
{
Name: "serve",
Usage: "start in server mode",
Aliases: []string{"s"},
Action: Serve,
Flags: []cli.Flag{
cli.StringFlag{Name: "o", Value: "0.0.0.0", Usage: "listen on HOST."},
cli.IntFlag{Name: "p", Value: 8080, Usage: "use PORT."},
},
},
{
Name: "push",
Usage: "push slide.",
Aliases: []string{"p"},
Action: Push,
Flags: []cli.Flag{
cli.StringFlag{Name: "s", Value: "0.0.0.0", Usage: "remote server adderess."},
cli.IntFlag{Name: "p", Value: 8081, Usage: "remote server port."},
},
},
}
app.Run(os.Args)
}