caddy/cmd/caddy2/main.go

26 lines
512 B
Go
Raw Normal View History

2019-03-26 21:00:54 +03:00
package main
import (
"log"
"bitbucket.org/lightcodelabs/caddy2"
2019-03-27 04:42:52 +03:00
_ "net/http/pprof"
2019-03-26 21:00:54 +03:00
// this is where modules get plugged in
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/caddylog"
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/staticfiles"
2019-03-26 21:00:54 +03:00
_ "bitbucket.org/lightcodelabs/dynamicconfig"
)
func main() {
2019-03-27 04:42:52 +03:00
err := caddy2.StartAdmin("127.0.0.1:1234")
2019-03-26 21:00:54 +03:00
if err != nil {
log.Fatal(err)
}
2019-03-27 04:42:52 +03:00
defer caddy2.StopAdmin()
2019-03-26 21:00:54 +03:00
select {}
}