- let task1 = tokio::spawn(async {
- println!("Hello, world!");
- });
- let task2 = tokio::spawn(guten_tag());
+ let listener = TcpListener::bind("127.0.0.1:8181").await.unwrap();
+
+ loop {
+ let (stream, _) = listener.accept().await.unwrap();
+ handle_connection(stream).await;
+ }
+}
+
+async fn handle_connection(mut stream: TcpStream) {
+ let contents = "{\"balance\": 0.00}";