pogo/webserver.go
gmemstr 6b2774d9c2 Removed configreader.go and renamed ishanjain28/pogo -> gmemstr/pogo
Configreader was largely unused in new refactor so removed it altogether.
2017-10-05 12:27:55 -07:00

29 lines
535 B
Go

/* webserver.go
*
* This is the webserver handler for Pogo, and handles
* all incoming connections, including authentication.
*/
package main
import (
"fmt"
"log"
"net/http"
"github.com/gmemstr/pogo/router"
)
// Main function that defines routes
func main() {
// Start the watch() function in generate_rss.go, which
// watches for file changes and regenerates the feed
go watch()
// Define routes
// We're live
r := router.Init()
fmt.Println("Listening on port :3000")
log.Fatal(http.ListenAndServe(":3000", r))
}