예제 #1
0
파일: main.go 프로젝트: Fantasim/Langage-Go
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)
}