From 572a0ccb39f3272d49918370c8308bd813b23ea9 Mon Sep 17 00:00:00 2001 From: Uzair Mohammed Date: Tue, 7 May 2024 00:10:54 -0700 Subject: [PATCH] Added a README.md file --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..23f1625 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# Introduction + +This repository contains a small and simple server I made as part of [this course on Udemy](https://www.udemy.com/course/rust-fundamentals/?couponCode=ST20MT50724). + +The server is a simple HTTP server that listens on port 3000 and responds with a simple HTML page. The objective of this course was to learn the basics of Rust, so the server is very simple and does not have any advanced features. + +# How to run + +To run the server, you need to have Rust installed. You can install Rust by following the instructions on the [official website](https://www.rust-lang.org/tools/install). + +Once you have Rust installed, you can run the server by executing the following command: + +```bash +cargo run +``` + +This will compile the server and start it. You can then access the server by opening a web browser and navigating to `http://localhost:3000`. + +## Modifying the server + +To change the port the server listens on, you can modify the `main.rs` file and change the following line: + +```rust +fn main() { + /*...*/ + let server = Server::new(String::from("127.0.0.1:3000")); + /*...*/ +} +``` + +You can replace `3000` with any other port number you want. \ No newline at end of file