Add asset handling
This commit is contained in:
parent
7cc828b7dd
commit
492aadd585
3
main.go
3
main.go
|
@ -220,6 +220,9 @@ func main() {
|
|||
router.HandleFunc("/save/{output}", saveHandler)
|
||||
router.HandleFunc("/del/{pasteId}/{delKey}", delHandler)
|
||||
router.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/"))))
|
||||
router.PathPrefix("/css").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/css/"))))
|
||||
router.PathPrefix("/js").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/js/"))))
|
||||
router.PathPrefix("/fonts").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/fonts/"))))
|
||||
err := http.ListenAndServe(PORT, router)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
Loading…
Reference in New Issue