Пример #1
0
func main() {

	initRoutes()
	api.InitRethinkDB()

	config := swagger.Config{
		WebServices:    restful.RegisteredWebServices(), // you control what services are visible
		WebServicesUrl: "http://localhost:9000",
		ApiPath:        "/apidocs.json",

		// Optionally, specifiy where the UI is located
		SwaggerPath:     "/apidocs/",
		SwaggerFilePath: "swagger-ui/dist"}

	swagger.InstallSwaggerService(config)
	http.ListenAndServe(":9000", nil)

}
Пример #2
0
func main() {
	initWebSocket()
	api.InitRethinkDB()
	http.ListenAndServe(":9001", nil)
}