2019-03-26 21:00:54 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
2019-03-27 04:42:52 +03:00
|
|
|
_ "net/http/pprof"
|
|
|
|
|
2019-04-03 18:47:27 +03:00
|
|
|
"bitbucket.org/lightcodelabs/caddy2"
|
|
|
|
|
2019-03-26 21:00:54 +03:00
|
|
|
// this is where modules get plugged in
|
2019-04-03 18:47:27 +03:00
|
|
|
|
2019-03-26 21:00:54 +03:00
|
|
|
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp"
|
2019-04-01 05:41:29 +03:00
|
|
|
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/caddylog"
|
|
|
|
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp/staticfiles"
|
2019-04-25 22:54:48 +03:00
|
|
|
_ "bitbucket.org/lightcodelabs/caddy2/modules/caddytls"
|
2019-03-26 21:00:54 +03:00
|
|
|
_ "bitbucket.org/lightcodelabs/dynamicconfig"
|
2019-04-08 23:25:27 +03:00
|
|
|
_ "bitbucket.org/lightcodelabs/proxy"
|
2019-03-26 21:00:54 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
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 {}
|
|
|
|
}
|