Changeset 78 in code for trunk/serve.go


Ignore:
Timestamp:
Dec 10, 2023, 11:57:40 PM (18 months ago)
Author:
Izuru Yakumo
Message:

Just a documentation update

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/serve.go

    r73 r78  
    3030}
    3131
    32 func HttpServe(Dir string) {
     32// This function is called by the `aya serve` subcommand
     33func HttpServe(Dir string, Port int) {
    3334        handler := &Handler{http.FileServer(http.Dir(Dir))}
    3435        http.Handle("/", handler)
    35         addr := fmt.Sprintf(":%d", 8000)
     36        addr := fmt.Sprintf(":%d", Port)
    3637        log.Printf("Listening on %s\n", addr)
    3738        log.Fatal(http.ListenAndServe(addr, nil))
Note: See TracChangeset for help on using the changeset viewer.