Changeset 73 in code


Ignore:
Timestamp:
Oct 23, 2023, 10:39:52 PM (20 months ago)
Author:
Izuru Yakumo
Message:

コードを借りる

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

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmd/aya/main.go

    r72 r73  
    1 // $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v 1.0 2023-10-03 02:34:17, yakumo_izuru Exp $
     1// $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v0.6.4 2023-10-23 22:26:23, yakumo_izuru Exp $
    22package main
    33
     
    77        "io"
    88        "log"
    9         "net/http"
    109        "os"
    1110        "os/exec"
     
    370369}
    371370
    372 // Serve the public directory over HTTP
    373 func serve() {
    374         root := http.Dir(PUBDIR)
    375         http.Handle("/", http.FileServer(root))
    376         log.Printf("Serving the %s directory over http://localhost:8000. Interrupt with ^C.\n", PUBDIR)
    377         log.Fatal(http.ListenAndServe(":8000", nil))
    378 }
    379 
    380371// Initialize the environment
    381372func init() {
     
    423414                printUsage()
    424415        case "serve":
    425                 serve()
     416                aya.HttpServe(PUBDIR)
    426417        case "var":
    427418                if len(args) == 0 {
Note: See TracChangeset for help on using the changeset viewer.