2015-12-29 03:08:03 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
2016-02-19 10:13:30 +00:00
|
|
|
"net/http"
|
2015-12-29 13:05:47 +00:00
|
|
|
)
|
|
|
|
|
2016-02-19 10:13:30 +00:00
|
|
|
func main(){
|
|
|
|
node := NewNodeServer("/nodes")
|
|
|
|
go node.Listen()
|
|
|
|
|
|
|
|
annouced := NewAnnouced(node)
|
|
|
|
go annouced.Run()
|
2015-12-29 13:05:47 +00:00
|
|
|
|
2016-02-19 10:13:30 +00:00
|
|
|
// static files
|
|
|
|
http.Handle("/", http.FileServer(http.Dir("webroot")))
|
2015-12-29 13:05:47 +00:00
|
|
|
|
2016-02-19 10:13:30 +00:00
|
|
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
2015-12-29 03:08:03 +00:00
|
|
|
}
|