This repository contains C code for a simple web server using the Libuv library. The web server can serve static files from a directory on the server and handle HTTP GET requests for these files.
- Ubuntu operating system
- GCC compiler
- Libuv library
Install Libuv library(for this project we used version 1.44.2)
- Clone the repository to your local machine
- Change into the simple-web-server directory
- Compile the server code using GCC: gcc -o server main.c -luv
- Start the server: ./server
- The server listens on port 80 by default.
- The server can serve static files from a directory named "public" in the root directory of the project.
- To request a file, enter the URL in the web browser in the format: http://localhost:80/filename
- The server will respond with the requested file or a 404 error message if the file is not found.
- If you find any bugs or issues with the code, feel free to open a new issue or submit a pull request.
- All contributions are welcome!
This code was inspired by the ALX software enginering programme and will serve as our first portfolio project
AUTHORS
-
Naod Ararsa
-
Stephen Obialor
-
Chima Nnach