diff --git a/public/404.html b/public/404.html deleted file mode 100644 index 22dfb0b..0000000 --- a/public/404.html +++ /dev/null @@ -1,9 +0,0 @@ - - -
-The requested page could not be found.
- - diff --git a/public/404.json b/public/404.json new file mode 100644 index 0000000..34a517a --- /dev/null +++ b/public/404.json @@ -0,0 +1,3 @@ +{ + "detail": "Route not found, or request malformed...thats all im saying." +} diff --git a/src/main.rs b/src/main.rs index 47eac09..b642551 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,12 @@ struct IncomingRequest { // Listen on port and return response. fn main() { - let listener = TcpListener::bind("164.92.85.112:7878").unwrap(); + let run_local = false; + let mut listener = TcpListener::bind("127.0.0.1:6942").unwrap(); + + if !run_local { + listener = TcpListener::bind("164.92.85.112:7878").unwrap(); + } for stream in listener.incoming() { let stream = stream.unwrap(); @@ -70,7 +75,7 @@ fn get_api_key(headers: Vec