Initial import
This commit is contained in:
15
example/main.go
Normal file
15
example/main.go
Normal file
@@ -0,0 +1,15 @@
|
||||
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))))
|
||||
}
|
Reference in New Issue
Block a user