mirror of
https://github.com/jimeh/kotaku-uk-rss.git
synced 2026-02-19 10:56:41 +00:00
Update in preparation for Heroku
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
kotaku-uk-rss
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -175,7 +176,7 @@ func updateRssLoop() {
|
||||
feed, _ := buildFeed(articles).ToRss()
|
||||
rssCache.Set(feed)
|
||||
fmt.Println("done")
|
||||
fmt.Println("taking a 60 second nap ^_^")
|
||||
fmt.Println("taking a nap for 60 seconds ^_^")
|
||||
time.Sleep(60 * time.Second)
|
||||
}
|
||||
}
|
||||
@@ -201,5 +202,8 @@ var rssCache = RssCache{}
|
||||
func main() {
|
||||
go updateRssLoop()
|
||||
http.HandleFunc("/rss", serveRss)
|
||||
http.ListenAndServe(":1234", nil)
|
||||
err := http.ListenAndServe(":"+os.Getenv("PORT"), nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user