1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Works so much better

This commit is contained in:
Zack
2016-02-07 11:05:38 -05:00
parent a6d89e5585
commit 19aaf7bb44
14 changed files with 287 additions and 97 deletions

8
main.go Executable file → Normal file
View File

@ -1,6 +1,7 @@
package main
import (
"fmt"
"log"
"os"
@ -21,10 +22,17 @@ func main() {
ExternalIP = os.Args[1]
Open()
defer Close()
// Default page
p := CowyoData{"about", about_page}
p.save()
fmt.Println(about_page)
r := gin.Default()
r.LoadHTMLGlob("templates/*")
r.GET("/", newNote)
r.GET("/:title", editNote)
r.GET("/:title/*option", everythingElse)
r.DELETE("/listitem", deleteListItem)
r.Run(":12312")
}