mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
4829870890
Former-commit-id: 8c19482190
22 lines
359 B
Go
22 lines
359 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/hacdias/filemanager"
|
|
handlers "github.com/hacdias/filemanager/http"
|
|
)
|
|
|
|
var cfg *filemanager.Config
|
|
|
|
func handler(w http.ResponseWriter, r *http.Request) {
|
|
handlers.ServeHTTP(w, r, cfg)
|
|
}
|
|
|
|
func main() {
|
|
cfg = filemanager.New("D:\\TEST\\")
|
|
|
|
http.HandleFunc("/", handler)
|
|
http.ListenAndServe(":8080", nil)
|
|
}
|