https://github.com/vrongmeal/cerver
Simple HTTP server made in C
https://github.com/vrongmeal/cerver
c server sockets
Last synced: 11 months ago
JSON representation
Simple HTTP server made in C
- Host: GitHub
- URL: https://github.com/vrongmeal/cerver
- Owner: vrongmeal
- License: mit
- Created: 2018-07-14T18:14:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-27T19:57:24.000Z (over 7 years ago)
- Last Synced: 2025-02-23T10:31:13.018Z (over 1 year ago)
- Topics: c, server, sockets
- Language: C
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cerver
Simple HTTP server made in C
- Handles routing for `.html`or `.htm` files.
- `/` finds `index.html` or `index.htm`.
- Throws 404 error when file not found.
## Setup
1. Clone the repository and `cd` into it.
2. Run the following command:
```shell
> gcc cerver.c -o cerver
```
The above command will create an executable for cerver.
3. Finally to run the server for folder `path/to/folder`, at the port `XYZ`:
```shell
> ./cerver "path/to/folder" XYZ
```