mirror of
https://github.com/caddyserver/xcaddy.git
synced 2024-11-08 10:19:59 +00:00
Update readme, specify local binary when executing
This commit is contained in:
parent
4f3e0ef756
commit
f74ee60bd8
2 changed files with 10 additions and 1 deletions
|
@ -64,6 +64,15 @@ $ xcaddy build \
|
||||||
--with github.com/caddyserver/ntlm-transport@v0.1.1=../../my-fork
|
--with github.com/caddyserver/ntlm-transport@v0.1.1=../../my-fork
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can even replace Caddy core using the `--with` flag:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ xcaddy build \
|
||||||
|
--with github.com/caddyserver/caddy/v2=../../my-caddy-fork
|
||||||
|
```
|
||||||
|
|
||||||
|
This allows you to hack on Caddy core (and optionally plug in extra modules at the same time!) with relative ease.
|
||||||
|
|
||||||
### For plugin development
|
### For plugin development
|
||||||
|
|
||||||
If you run `xcaddy` from within the folder of the Caddy plugin you're working on _without the `build` subcommand_, it will build Caddy with your current module and run it, as if you manually plugged it in and invoked `go run`.
|
If you run `xcaddy` from within the folder of the Caddy plugin you're working on _without the `build` subcommand_, it will build Caddy with your current module and run it, as if you manually plugged it in and invoked `go run`.
|
||||||
|
|
|
@ -141,7 +141,7 @@ func getCaddyOutputFile() string {
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
return "caddy.exe"
|
return "caddy.exe"
|
||||||
}
|
}
|
||||||
return "caddy"
|
return "." + string(filepath.Separator) + "caddy"
|
||||||
}
|
}
|
||||||
|
|
||||||
func runDev(ctx context.Context, args []string) error {
|
func runDev(ctx context.Context, args []string) error {
|
||||||
|
|
Loading…
Reference in a new issue