diff options
Diffstat (limited to 'serve_options.go')
| -rw-r--r-- | serve_options.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/serve_options.go b/serve_options.go new file mode 100644 index 0000000..fdc2b8d --- /dev/null +++ b/serve_options.go @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +// SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info> + +package awwan + +import "git.sr.ht/~shulhan/pakakeh.go/lib/http" + +// DefListenAddress default HTTP server address to serve WUI. +const DefListenAddress = `127.0.0.1:17600` + +// ServeOptions define the options to use on Serve function. +// See [git.sr.ht/~shulhan/pakakeh.go/lib/http.ServerOptions] for more information. +type ServeOptions struct { + http.ServerOptions + + // IsDevelopment enable development mode. + IsDevelopment bool +} + +func (opts *ServeOptions) init() { + if len(opts.Address) == 0 { + opts.Address = DefListenAddress + } +} |
