Example #1
0
func TestMain(m *testing.M) {
	database.NewDatabase("sqlite3", ":memory:")

	i := m.Run()

	os.Exit(i)
}
Example #2
0
func main() {
	database.NewDatabase("", "")
	websocket.NewServer()
	go runner.Runner()

	router := web.Routes()
	config := database.GetConfig()

	if config.Cert != "" {
		log.Fatalln(http.ListenAndServeTLS(port(), config.Cert, config.Key, router))
	} else {
		log.Fatalln(http.ListenAndServe(port(), router))
	}
}