mirror of
				https://github.com/go-kratos/kratos.git
				synced 2025-10-30 23:47:59 +02:00 
			
		
		
		
	Add README file for http & helloworld examples (#839)
* Add readme for helloworld example. * Add readme file for http example.
This commit is contained in:
		
							
								
								
									
										10
									
								
								examples/helloworld/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								examples/helloworld/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| # Run the example | ||||
|  | ||||
| 1、Compile and execute the server code: | ||||
| ```shell | ||||
| $ go run server/main.go | ||||
| ``` | ||||
| 2、From a different terminal, compile and execute the client code: | ||||
| ```shell | ||||
| $ go run client/main.go | ||||
| ``` | ||||
							
								
								
									
										33
									
								
								examples/http/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								examples/http/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| # Run the examples | ||||
|  | ||||
| ## gin | ||||
| 1、Compile and execute the server code: | ||||
| ```shell | ||||
| $ go run gin/main.go | ||||
| ``` | ||||
| 2、From a different terminal, access the api to see the output: | ||||
| ```shell | ||||
| $ curl http://127.0.0.1:8000/home | ||||
| Hello Gin! | ||||
| ``` | ||||
|  | ||||
| ## mux | ||||
| 1、Compile and execute the server code: | ||||
| ```shell | ||||
| $ go run mux/main.go | ||||
| ``` | ||||
| 2、From a different terminal, access the api to see the output: | ||||
| ```shell | ||||
| $ curl http://127.0.0.1:8000/home | ||||
| Hello Gorilla Mux! | ||||
| ``` | ||||
|  | ||||
| ## static | ||||
| 1、Compile and execute the server code: | ||||
| ```shell | ||||
| $ go run static/main.go | ||||
| ``` | ||||
| 2、Access the following url with your browser: | ||||
| ``` | ||||
| http://127.0.0.1:8000/assets | ||||
| ``` | ||||
		Reference in New Issue
	
	Block a user