summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/caddy2/main.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmd/caddy2/main.go b/cmd/caddy2/main.go
new file mode 100644
index 0000000..9e482c1
--- /dev/null
+++ b/cmd/caddy2/main.go
@@ -0,0 +1,21 @@
+package main
+
+import (
+ "log"
+
+ "bitbucket.org/lightcodelabs/caddy2"
+
+ // this is where modules get plugged in
+ _ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
+ _ "bitbucket.org/lightcodelabs/dynamicconfig"
+)
+
+func main() {
+ err := caddy2.Start("127.0.0.1:1234")
+ if err != nil {
+ log.Fatal(err)
+ }
+ defer caddy2.Stop()
+
+ select {}
+}