Add warp & tokio
This commit is contained in:
		
							parent
							
								
									74d8634397
								
							
						
					
					
						commit
						33674eec78
					
				
					 3 changed files with 1024 additions and 2 deletions
				
			
		
							
								
								
									
										1016
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										1016
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -5,3 +5,5 @@ edition = "2021" | ||||||
| authors = ["charlotte ✨ <charlotte@lavender.software>"] | authors = ["charlotte ✨ <charlotte@lavender.software>"] | ||||||
| 
 | 
 | ||||||
| [dependencies] | [dependencies] | ||||||
|  | tokio = { version = "1.15.0", features = ["full"] } | ||||||
|  | warp = "0.3.2" | ||||||
|  |  | ||||||
|  | @ -1,3 +1,7 @@ | ||||||
| fn main() { | use warp::Filter; | ||||||
|     println!("Hello, world!"); | 
 | ||||||
|  | #[tokio::main] | ||||||
|  | async fn main() { | ||||||
|  |     let hello = warp::any().map(|| "Hello!".to_string()); | ||||||
|  |     warp::serve(hello).bind(([127, 0, 0, 1], 8000)).await; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue