func main() {
	if app.RequiresBootStrap() {
		err := app.Bootstrap()
		if err != nil {
			fmt.Printf("Error bootstrapping server %s\n", err)
			return
		}
	}
	server, err := SetupServer()
	if err != nil {
		fmt.Printf("server: error setting up %s\n", err)
		return
	}
	server.Logf("#info Starting server in %s mode on port %d", server.Mode(), server.Port())
	if server.Production() {
		err = startTLSAutocert(server)
		if err != nil {
			server.Fatalf("Error starting server %s", err)
		}
	} else {
		err = server.Start()
		if err != nil {
			server.Fatalf("Error starting server %s", err)
		}
	}
}
Main entrypoint for the server which performs bootstrap, setup
then runs the server. Most setup is delegated to the src/app pkg.
package main
import (
	"fmt"
	"net/http"
	"os"
	"strings"
	"golang.org/x/crypto/acme/autocert"
	"github.com/fragmenta/server"
	"github.com/fragmenta/server/config"
	"github.com/kennygrant/gohackernews/src/app"
)