Changeset 73 in code
- Timestamp:
- Oct 23, 2023, 10:39:52 PM (20 months ago)
- 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 $ 2 2 package main 3 3 … … 7 7 "io" 8 8 "log" 9 "net/http"10 9 "os" 11 10 "os/exec" … … 370 369 } 371 370 372 // Serve the public directory over HTTP373 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 380 371 // Initialize the environment 381 372 func init() { … … 423 414 printUsage() 424 415 case "serve": 425 serve()416 aya.HttpServe(PUBDIR) 426 417 case "var": 427 418 if len(args) == 0 {
Note:
See TracChangeset
for help on using the changeset viewer.