| 1 | // Copyright 2015 Matthew Holt and The Caddy Authors |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | // Package main is the entry point of the Caddy application. |
| 16 | // Most of Caddy's functionality is provided through modules, |
| 17 | // which can be plugged in by adding their import below. |
| 18 | // |
| 19 | // There is no need to modify the Caddy source code to customize your |
| 20 | // builds. You can easily build a custom Caddy with these simple steps: |
| 21 | // |
| 22 | // 1. Copy this file (main.go) into a new folder |
| 23 | // 2. Edit the imports below to include the modules you want plugged in |
| 24 | // 3. Run `go mod init caddy` |
| 25 | // 4. Run `go install` or `go build` - you now have a custom binary! |
| 26 | // |
| 27 | // Or you can use xcaddy which does it all for you as a command: |
| 28 | // https://github.com/caddyserver/xcaddy |
| 29 | package main |
| 30 | |
| 31 | import ( |
| 32 | _ "time/tzdata" |
| 33 | |
| 34 | caddycmd "github.com/caddyserver/caddy/v2/cmd" |
| 35 | |
| 36 | // plug in Caddy modules here |
| 37 | _ "github.com/caddyserver/caddy/v2/modules/standard" |
| 38 | ) |
| 39 | |
| 40 | func main() { |
| 41 | caddycmd.Main() |
| 42 | } |