mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
21 lines
354 B
Go
21 lines
354 B
Go
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 {}
|
|
}
|