Git Product home page Git Product logo

http-server-in-c's Introduction

HTTP Server from Scratch in C

This is a basic multi-threaded HTTP server written in C without any third-party library. The server listens on a port (4221). You can use curl to test the server.

I had already added this to my todo listen after I wrote a TCP Server in C but since Build your own HTTP server at CodeCrafters was free this month, I built one just a few hours. The code is bad tho. Have to clean it up.

How to run

  1. Clone the repository

  2. Compile client and server programs (don't worry, there's a Makefile to do this for you)

    make
  3. Run the server (it will run on port 4221)

    ./bin/server
  4. Use curl to test the server.

    curl -v localhost:4221/echo/abc
  5. Ctrl+C to stop the server

http-server-in-c's People

Contributors

biraj21 avatar

Stargazers

Siddharth Sengupta avatar SFlauto avatar Jacques Tardie avatar T bone avatar  avatar Wayne avatar  avatar Rajan Gaul avatar Vikram Seervi avatar Dominik Antal avatar Glowstudent avatar  avatar  avatar Anvin.C.Shaju avatar Alabi Ayobami avatar tetsuo avatar ReikiReika avatar Shohei Shimomura avatar Aditya Pandey avatar Abdülkerim AKSAK avatar  avatar Andrei Surugiu avatar Bikash Pokhrel avatar Pahril avatar Felipe Jara avatar  avatar smeet-kachhadiya avatar Ankit Sharma avatar Kishore Chandra Sahoo avatar Sithum Bopitiya avatar Paul Sebalu avatar Nikita Goltiakov avatar Arif GÖRE avatar Alekh avatar Kelvin Yelyen avatar Tao Wei avatar Mouad Sennane avatar  avatar Joe Martinez avatar Lucas Vieira avatar  avatar Ayomide Ojo avatar Mustafa Dursun. avatar Amaan avatar Murat Mirgün ERCAN avatar AshecOne avatar gustavo avatar Melih Sivri avatar Zain Shabbir avatar Neeraj Ramola avatar

Watchers

 avatar

Forkers

splasky bbanks14

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.