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