You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
354 B
21 lines
354 B
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 {}
|
|
}
|
|
|