cerca

lean forum software (pmc local branch)
Log | Files | Refs | README | LICENSE

commit 60b9a31ceef9d77f1f24858fd92d17f36d43d1fc
parent cf618eb2bcd71623dee34417b595c6c0ccafb122
Author: idk <hankhill19580@gmail.com>
Date:   Sun, 28 Aug 2022 15:40:55 -0400

godoc

Diffstat:
Mserver/server.go | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/server/server.go b/server/server.go @@ -696,6 +696,10 @@ func Serve(allowlist []string, sessionKey string, isdev bool) { http.ListenAndServe(port, nil) } +// CercaForum is an HTTP.ServeMux which is set up to initialize and run +// a cerca-based forum. Software developers who wish to customize the +// networks and security which they use to operate may wish to use this +// to listen with TLS, Onion, or I2P addresses without manual setup. type CercaForum struct { http.ServeMux Directory string @@ -713,6 +717,9 @@ func (u *CercaForum) directory() string { return u.Directory } +// NewServer sets up a new CercaForum object. Always use this to initialize +// new CercaForum objects. Pass the result to http.Serve() with your choice +// of net.Listener. func NewServer(allowlist []string, sessionKey string) (*CercaForum, error) { s := &CercaForum{ ServeMux: http.ServeMux{},