dist
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1,5 +1,5 @@
 | 
				
			|||||||
# Go
 | 
					# Go
 | 
				
			||||||
data
 | 
					data/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ---> Python
 | 
					# ---> Python
 | 
				
			||||||
# Byte-compiled / optimized / DLL files
 | 
					# Byte-compiled / optimized / DLL files
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.go
									
									
									
									
									
								
							@@ -34,8 +34,8 @@ func main() {
 | 
				
			|||||||
		})
 | 
							})
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// 設定靜態資源 (前端) 位于public目录下
 | 
						// 設定靜態資源 (前端) 位于dist目录下
 | 
				
			||||||
	r.PathPrefix("/").Handler(http.FileServer(http.Dir("./public/")))
 | 
						r.PathPrefix("/").Handler(http.FileServer(http.Dir("./dist/")))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// 設定路由
 | 
						// 設定路由
 | 
				
			||||||
	r.HandleFunc("/api", routers.GetDocs).Methods("GET")
 | 
						r.HandleFunc("/api", routers.GetDocs).Methods("GET")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user