Code Monkey home page Code Monkey logo

simple-web-server's Introduction

Simple Web Server

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.

Prerequisites:

  • Ubuntu operating system
  • GCC compiler
  • Libuv library

Installation

Install Libuv library(for this project we used version 1.44.2)

Compiling and Running the Code

  1. Clone the repository to your local machine
  2. Change into the simple-web-server directory
  3. Compile the server code using GCC: gcc -o server main.c -luv
  4. Start the server: ./server

Usage

  • 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.

Contributing

  • 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!

Acknowledgements

This code was inspired by the ALX software enginering programme and will serve as our first portfolio project

AUTHORS

  1. Naod Ararsa

  2. Stephen Obialor

  3. Chima Nnach

simple-web-server's People

Contributors

cobidex avatar deazstar avatar kingiex avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.