MCPcopy
hub / github.com/cortesi/devd / main

Function main

cmd/devd/devd.go:15–279  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13)
14
15func main() {
16 address := kingpin.Flag("address", "Address to listen on").
17 Short('A').
18 Default("127.0.0.1").
19 String()
20
21 allInterfaces := kingpin.Flag("all", "Listen on all addresses").
22 Short('a').
23 Bool()
24
25 certFile := kingpin.Flag("cert", "Certificate bundle file - enables TLS").
26 Short('c').
27 PlaceHolder("PATH").
28 ExistingFile()
29
30 forceColor := kingpin.Flag("color", "Enable colour output, even if devd is not connected to a terminal").
31 Short('C').
32 Bool()
33
34 downKbps := kingpin.Flag(
35 "down",
36 "Throttle downstream from the client to N kilobytes per second",
37 ).
38 PlaceHolder("N").
39 Short('d').
40 Default("0").
41 Uint()
42
43 notfound := kingpin.Flag("notfound", "Default when a static file is not found").
44 PlaceHolder("PATH").
45 Short('f').
46 Strings()
47
48 logHeaders := kingpin.Flag("logheaders", "Log headers").
49 Short('H').
50 Default("false").
51 Bool()
52
53 ignoreLogs := kingpin.Flag(
54 "ignore",
55 "Disable logging matching requests. Regexes are matched over 'host/path'",
56 ).
57 Short('I').
58 PlaceHolder("REGEX").
59 Strings()
60
61 livereloadNaked := kingpin.Flag("livereload", "Enable livereload").
62 Short('L').
63 Default("false").
64 Bool()
65
66 livereloadRoutes := kingpin.Flag("livewatch", "Enable livereload and watch for static file changes").
67 Short('l').
68 Default("false").
69 Bool()
70
71 moddMode := kingpin.Flag("modd", "Modd is our parent - synonym for -LCt").
72 Short('m').

Callers

nothing calls this directly

Calls 7

AddRoutesMethod · 0.95
AddIgnoresMethod · 0.95
ServeMethod · 0.95
StatMethod · 0.80
StringMethod · 0.65
MuxMatchMethod · 0.45
OpenMethod · 0.45

Tested by

no test coverage detected