Exemple #1
0
func Start() {
	db := database.ConnectDatabase("user=web_backend dbname=messenger")
	err := db.Ping()
	if err != nil {
		log.Print(err)
	}

	Listen(db)
}
Exemple #2
0
func Start() {
	db := database.ConnectDatabase("user=chat_backend dbname=messenger")
	err := db.Ping()
	if err != nil {
		log.Print(err)
	}

	server := NewServer("/ws")
	go server.Listen(db)
}