Example #1
0
func main() {
	connectionString := ":3001"
	s := server.NewServer()
	s.Register(&controllers.Todos{})
	runError := s.Run(connectionString)
	if runError != nil {
		fmt.Println("Error when running server", runError)
	}

}
Example #2
0
func main() {

	connectionString := ":" + os.Getenv("PORT")
	s := server.NewServer()
	s.Register(&HelloController{})
	s.Register(&HelloDep{})
	runError := s.Run(connectionString)
	if runError != nil {
		fmt.Println("Error when running server", runError)
	}

}