prototype report page
This commit is contained in:
@@ -73,7 +73,7 @@ func runApp(ctx context.Context) error {
|
||||
|
||||
func runServer(ctx context.Context, db *raw_events.Store) <-chan error {
|
||||
srv := &http.Server{
|
||||
Addr: ":9000", // local
|
||||
Addr: ":8082", // local
|
||||
Handler: buildHTTPHandler(db),
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ func runServer(ctx context.Context, db *raw_events.Store) <-chan error {
|
||||
defer cancel()
|
||||
defer close(alreadyShutdownCh)
|
||||
|
||||
fmt.Println("server running on 9000...")
|
||||
fmt.Println("server running on 8082...")
|
||||
if err := srv.ListenAndServe(); err != nil {
|
||||
if !errors.Is(err, http.ErrServerClosed) {
|
||||
runningErrCh <- fmt.Errorf("server experienced error: %w", err)
|
||||
@@ -129,7 +129,8 @@ func buildHTTPHandler(db *raw_events.Store) http.Handler {
|
||||
mux := http.NewServeMux()
|
||||
|
||||
mux.Handle("/webhooks/", http.StripPrefix("/webhooks", webhooks.New(db)))
|
||||
mux.Handle("/site/", http.StripPrefix("/site", site.NewSiteHandler()))
|
||||
mux.Handle("/site/", http.StripPrefix("/site", site.NewSiteHandler("./internal/site", db)))
|
||||
mux.Handle("/", http.RedirectHandler("/site", http.StatusPermanentRedirect))
|
||||
|
||||
return mux
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user