summaryrefslogtreecommitdiff
path: root/blog
diff options
context:
space:
mode:
Diffstat (limited to 'blog')
-rw-r--r--blog/Cargo.toml8
-rw-r--r--blog/src/main.rs14
2 files changed, 22 insertions, 0 deletions
diff --git a/blog/Cargo.toml b/blog/Cargo.toml
new file mode 100644
index 0000000..1b8587f
--- /dev/null
+++ b/blog/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "blog"
+version = "0.1.0"
+authors = ["Andrew <saintruler@gmail.com>"]
+edition = "2018"
+
+[dependencies]
+spider = { path = "../spider" }
diff --git a/blog/src/main.rs b/blog/src/main.rs
new file mode 100644
index 0000000..0dba17a
--- /dev/null
+++ b/blog/src/main.rs
@@ -0,0 +1,14 @@
+use std::net::TcpListener;
+
+use spider::handle_client;
+
+fn main() -> std::io::Result<()> {
+ let listener = TcpListener::bind("localhost:3000")?;
+
+ // accept connections and process them serially
+ for stream in listener.incoming() {
+ handle_client(stream?);
+ }
+
+ Ok(())
+}