Add index page
This commit is contained in:
parent
b05d6917eb
commit
9361b3f64d
1
main.go
1
main.go
|
@ -214,6 +214,7 @@ func pasteHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
func main() {
|
||||
router := mux.NewRouter().StrictSlash(true)
|
||||
router.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/"))))
|
||||
router.HandleFunc("/p/{pasteId}", pasteHandler)
|
||||
router.HandleFunc("/p/{pasteId}/{lang}", langHandler)
|
||||
router.HandleFunc("/save", saveHandler)
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="https://p.pantsu.cat/save" method="post">
|
||||
<input type="text" name="p">
|
||||
<input type="submit" value="paste">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue