cerveurus

所属分类:后台框架
开发工具:C
文件大小:0KB
下载次数:0
上传日期:2023-08-04 01:37:48
上 传 者sh-1993
说明:  我最初的cerveur分叉——一个用C编写的简单web服务器框架,用于娱乐和学习。,
(My original fork from cerveur - a simple web server framework written in C for fun and learning.,)

文件列表:
CMakeLists.txt (817, 2023-08-03)
LICENSE (1068, 2023-08-03)
compile_commands.json (1053, 2023-08-03)
ext/ (0, 2023-08-03)
ext/cJSON/ (0, 2023-08-03)
include/ (0, 2023-08-03)
include/HTTP_Server.h (3183, 2023-08-03)
include/Response.h (55, 2023-08-03)
include/Routes.h (1673, 2023-08-03)
include/SQL.h (544, 2023-08-03)
include/SortedArray.h (1385, 2023-08-03)
sql/ (0, 2023-08-03)
sql/sample.sql (89, 2023-08-03)
src/ (0, 2023-08-03)
src/CMakeLists.txt (876, 2023-08-03)
src/HTTP_Server.c (13935, 2023-08-03)
src/Response.c (527, 2023-08-03)
src/Routes.c (2537, 2023-08-03)
src/SQL.c (1349, 2023-08-03)
src/SortedArray.c (2332, 2023-08-03)
src/main.c (3550, 2023-08-03)
static/ (0, 2023-08-03)
static/index.css (25, 2023-08-03)
static/index2.css (22, 2023-08-03)
templates/ (0, 2023-08-03)
templates/404.html (133, 2023-08-03)
templates/about.html (162, 2023-08-03)
templates/chicken.html (163, 2023-08-03)
templates/index.html (161, 2023-08-03)
templates/sth.html (165, 2023-08-03)

# Cerveurus This is my personal fork from [cerveur](https://github.com/infraredCoding/cerveur), a simple web framework written in C for fun and learning. ## Sample Project To see a full sample project built with Cerveurus, check out my [Cerveurus Sample Project](https://github.com/Kiyoshika/cerveurus-sample). ## Why a seperate project? I feel like the original project is pretty inactive and there are pull requests from 1+ months that are still open and there's a lot I want to contribute to this project so I decided to fork it and develop my own separate chain. ## Why call it cerveurus? The original name `cerveur` reminded me of `cerberus` so I'm naming it `cerveurus`. ## Dependencies I included [cJSON](https://github.com/DaveGamble/cJSON) as a git submodule to handle parsing JSON requests/reponses. You MUST use the `--recursive` flag when cloning this repo. See below section. ## How to Build from Source The original project used plain Makefiles but I'm a fan of CMake, so I will use that as the build system for this fork. This includes submodules so please clone the repo with: * `git clone --recursive git@github.com:Kiyoshika/cerveurus.git` Or if you forget to clone recursively you can use: * `git submodule init` * `git submodule update` Which should fetch the submodules. After cloning, enter the root directory and use: * `mkdir build && cd build` * `cmake .. && make` Which should build the `libcerveurus.a` static library that can be linked to your server. ## Running Tests To run the tests, go to the `build` folder and use `make test CTEST_OUTPUT_ON_FAILURE=TRUE`. ## How to Use ### Development After running `make` inside your build folder, a `main` executable will be generated inside `build/src` and copy over the `templates/` and `static/` folders. Use `./src/main` (assuming you're inside the `build` folder) to run the server. By default it's on port `6100` then go to `localhost:6100` in your browser. This is the development/testing server that you can play around with. When killing the server (e.g., Ctrl+C) you may need to wait ~10 seconds and/or kill the server a few times for it to pick up a connection again (at least, this has been my experience...) ### User Guide Will write more detail once library is more mature.

近期下载者

相关文件


收藏者