-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
66 lines (61 loc) · 994 Bytes
/
main.go
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package main
import (
"fmt"
"os"
"github.com/urfave/cli"
)
var flags = []cli.Flag{
cli.StringFlag{
EnvVar: "GIN_MODE",
Name: "mode",
},
cli.StringFlag{
EnvVar: "HOST",
Name: "host",
},
cli.BoolFlag{
EnvVar: "SECURED",
Name: "secured",
},
cli.BoolFlag{
EnvVar: "PUBLIC",
Name: "public",
},
cli.StringFlag{
EnvVar: "PORT",
Name: "port",
},
cli.StringFlag{
EnvVar: "SESSION_SECRET",
Name: "session-secret",
Value: "secret",
},
cli.StringFlag{
EnvVar: "SIGNING_KEY",
Name: "signing-key",
Usage: "signing key",
},
cli.StringFlag{
EnvVar: "DATABASE",
Name: "database",
Value: "dev",
},
cli.StringFlag{
EnvVar: "SPOTIFY_ID",
Name: "spotify-id",
},
cli.StringFlag{
EnvVar: "SPOTIFY_SECRET",
Name: "spotify-secret",
},
}
func main() {
app := cli.NewApp()
app.Name = "qitup-api"
app.Action = api
app.Flags = flags
if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}