DEBUG
This commit is contained in:
		
							
								
								
									
										6
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								main.go
									
									
									
									
									
								
							@@ -34,9 +34,6 @@ func main() {
 | 
				
			|||||||
		})
 | 
							})
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// 設定靜態資源 (前端) 位于dist目录下
 | 
					 | 
				
			||||||
	r.PathPrefix("/").Handler(http.FileServer(http.Dir("./dist/")))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// 設定路由
 | 
						// 設定路由
 | 
				
			||||||
	r.HandleFunc("/api", routers.GetDocs).Methods("GET")
 | 
						r.HandleFunc("/api", routers.GetDocs).Methods("GET")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -94,6 +91,9 @@ func main() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	r.HandleFunc("/img/{id}", routers.WebpGet).Methods("GET")
 | 
						r.HandleFunc("/img/{id}", routers.WebpGet).Methods("GET")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// 設定靜態資源 (前端) 位于dist目录下
 | 
				
			||||||
 | 
						r.PathPrefix("/").Handler(http.FileServer(http.Dir("./dist/")))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log.Println("Web Server is running on http://localhost:8080")
 | 
						log.Println("Web Server is running on http://localhost:8080")
 | 
				
			||||||
	if err := http.ListenAndServe(":8080", r); err != nil {
 | 
						if err := http.ListenAndServe(":8080", r); err != nil {
 | 
				
			||||||
		log.Fatal(err)
 | 
							log.Fatal(err)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user