16 lines
337 B
Go
16 lines
337 B
Go
package main
|
|
|
|
import (
|
|
"gitto.work/shortcut/enhanced-file-server"
|
|
"net/http"
|
|
"os"
|
|
)
|
|
|
|
/* Most simple example of using enhanced-file-server package. Will serve from the current directory on port 12345 */
|
|
|
|
func main() {
|
|
dir, err := os.Getwd()
|
|
|
|
log.Fatal(http.ListenAndServe(":12345", enhanced-file-server.FileServer(http.Dir(dir))))
|
|
}
|