summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-05-06 12:43:04 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-05-06 12:43:04 -0600
commitfbea3374e96d45b18569a5fe3b86127fd813dbdb (patch)
tree639f06ce3f75821eb118f1d76cb50208344c85cc /cmd
parent2eb35933271d5b2ef1ca29aaa8f00f6748c56424 (diff)
Add missing run.go (oops)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/run.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmd/run.go b/cmd/run.go
new file mode 100644
index 0000000..d19fb19
--- /dev/null
+++ b/cmd/run.go
@@ -0,0 +1,18 @@
+package caddycmd
+
+import (
+ "log"
+
+ "bitbucket.org/lightcodelabs/caddy2"
+)
+
+// Main executes the main function of the caddy command.
+func Main() {
+ err := caddy2.StartAdmin("127.0.0.1:1234")
+ if err != nil {
+ log.Fatal(err)
+ }
+ defer caddy2.StopAdmin()
+
+ select {}
+}