Skip to content

gamersekofy/rust-tcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This repository contains a small and simple server I made as part of this course on Udemy.

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.

Once you have Rust installed, you can run the server by executing the following command:

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:

fn main() {
    /*...*/
    let server = Server::new(String::from("127.0.0.1:3000"));
    /*...*/
}

You can replace 3000 with any other port number you want.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published