https://github.com/kasouza/kshttp
A simple HTTP server written in c++
https://github.com/kasouza/kshttp
cpp http-server
Last synced: about 1 month ago
JSON representation
A simple HTTP server written in c++
- Host: GitHub
- URL: https://github.com/kasouza/kshttp
- Owner: kasouza
- License: mit
- Created: 2021-12-21T18:42:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-08T02:27:02.000Z (about 4 years ago)
- Last Synced: 2025-12-29T16:50:58.674Z (6 months ago)
- Topics: cpp, http-server
- Language: C++
- Homepage:
- Size: 56.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kshttp
**K**asouza's **S**imple **HTTP** Server is a very very simple HTTP server. I've made it mostly because I was curious to see how hard it was to make an http sever in c/c++.
It was quite an interesting journey to learn a bit about socket programming. This isn't finished yet, I plan to add some features, make it a bit safer and add a cleaner API. Also make it compile to an actual library.
If you're curious, take a look at the code (All functions are documented in the header files, the docs are very ~~bad~~ good)!
# Compiling and Running
This project will only work on linux right now (maybe Mac??).
To compile do the following:
```
mkdir build
cd build
cmake .. && cmake --build .
```
and run it by running the generated executable:
`./kshttp`
The default program will listen to `localhost:8080` and respond with something AMAZING.
That's pretty much it by now.