| ) | ) | ||||
| func main() { | func main() { | ||||
| //readConfig() | |||||
| readConfigForTest() | |||||
| readConfig() | |||||
| //readConfigForTest() | |||||
| db.h = nil //make sure it's in proper state. | db.h = nil //make sure it's in proper state. | ||||
| filename := "rpn.superforex." + time.Now().Format("20060102150406") + ".log" | filename := "rpn.superforex." + time.Now().Format("20060102150406") + ".log" | ||||
| log.Println("Server started on: http://localhost:8080") | log.Println("Server started on: http://localhost:8080") | ||||
| //setup http handler | //setup http handler | ||||
| http.HandleFunc("/choosePayment", choosePayment) | |||||
| http.HandleFunc("/rpnNameAndCard", rpnNameAndCard) | |||||
| http.HandleFunc("/rpn_notify", rpnNotify) //called by rpn | |||||
| fs := wrapHandler(http.FileServer(http.Dir("./PG"))) | |||||
| http.HandleFunc("/rpnNameAndCard", rpnNameAndCard) //ask name and card no | |||||
| http.HandleFunc("/rpn_notify", rpnNotify) //called by rpn | |||||
| http.HandleFunc("/alipay", leanworkInFAT) // leanwork in | |||||
| fs := wrapHandler(http.FileServer(http.Dir("./PG"))) //leanwork P2P embeded in | |||||
| http.HandleFunc("/", fs) | http.HandleFunc("/", fs) | ||||
| http.ListenAndServe(":8080", nil) | http.ListenAndServe(":8080", nil) | ||||