Skip to content

juanlet/cplus_multithread_raw_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ HTTP Server Project

Description

C++ HTTP server that serves static files, provides a simple JSON API, and handles multiple clients concurrently using multithreading.

Dependencies

  • g++-13
  • jsoncpp (libjsoncpp-dev)

Setup Instructions

  1. Install dependencies:

    sudo apt update
    sudo apt install -y build-essential g++-13 libjsoncpp-dev
  2. Clone the repository:

    git clone https://github.com/yourusername/your-repo-name.git
    cd your-repo-name
  3. Compile the server:

    g++-13 -std=c++11 -pthread -ljsoncpp http_server.cpp -o http_server
  4. Run the server:

    ./http_server

Usage

  • Visit http://localhost:8080/ to view the homepage.
  • Visit http://localhost:8080/api to get a JSON response.

About

exploring C++ multithread

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published