summaryrefslogtreecommitdiff
path: root/cmd/run.go
blob: 1663dfbd39e73c612ca23b02c813f6da8b7f764a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package caddycmd

import (
	"log"

	"bitbucket.org/lightcodelabs/caddy2"
)

// Main executes the main function of the caddy command.
func Main() {
	addr := ":1234" // TODO: for dev only
	err := caddy2.StartAdmin(addr)
	if err != nil {
		log.Fatal(err)
	}
	defer caddy2.StopAdmin()

	log.Println("Caddy 2 admin endpoint listening on", addr)

	select {}
}