{"id":21813536,"url":"https://github.com/loggerhead/lhttpd","last_synced_at":"2025-04-13T23:27:48.580Z","repository":{"id":33541384,"uuid":"37187515","full_name":"loggerhead/lhttpd","owner":"loggerhead","description":"Lightweight http server","archived":false,"fork":false,"pushed_at":"2017-03-17T03:32:25.000Z","size":343,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T13:45:19.534Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loggerhead.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-10T09:22:10.000Z","updated_at":"2019-01-06T06:10:39.000Z","dependencies_parsed_at":"2022-09-12T22:01:26.221Z","dependency_job_id":null,"html_url":"https://github.com/loggerhead/lhttpd","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loggerhead%2Flhttpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loggerhead%2Flhttpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loggerhead%2Flhttpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loggerhead%2Flhttpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loggerhead","download_url":"https://codeload.github.com/loggerhead/lhttpd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248795639,"owners_count":21162810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T14:29:50.345Z","updated_at":"2025-04-13T23:27:48.548Z","avatar_url":"https://github.com/loggerhead.png","language":"C","readme":"# DEPRECATED\n\nBecause I find a good alternate--[Mongoose](https://github.com/cesanta/mongoose), which is small, no dependency, cross-platform, and written by pure C. Maybe you should consider use it.\n\n# Lhttpd\n\n[![Travis Build Status](https://travis-ci.org/loggerhead/lhttpd.svg)](https://travis-ci.org/loggerhead/lhttpd)\n\nLhttpd is a C library to take care of the detail about TCP and HTTP, and it's API is designed for ease of use, so you can focus on business logic.\n\n# Features\n\n* Asynchronous.\n* Lightweight and easy to use.\n* Provide TCP support and some webserver functionality.\n* Simple [bottle-like](http://bottlepy.org/docs/dev/tutorial.html#request-routing) web route support.\n* JSON support.\n* Redis support.\n* SQLite3 support.\n* __NOT thread-safe__.\n\n# Build and Install\n## Install\n\n```shell\n# compile, generate `liblhttpd.xxx` and `lhttpd.h`, and move they to `/usr/local/lib` and `/usr/local/include`\n./install.sh\n```\n\n**NOTE**: If you are linux user, please run below commands to update shared libraries before using `lhttpd`.\n\n```shell\n# You should use root user\necho \"/usr/local/lib\" \u003e\u003e /etc/ld.so.conf\nldconfig\n```\n\n## Dependency\n\nYou need [cmake](http://www.cmake.org/) and [make](http://www.gnu.org/software/make/) for build, and below libraries for compile.\n\n* Required: [libuv](https://github.com/libuv/libuv).\n* Optional: [json-c](https://github.com/json-c/json-c) for json support.\n* Optional: [sqlite3](https://www.sqlite.org/) for sqlite support.\n* Optional: [redis](https://github.com/antirez/redis) and [hiredis](https://github.com/redis/hiredis) for redis support.\n* Optional: [grequests](https://github.com/kennethreitz/grequests) for test.\n* Optional: [valgrind](http://valgrind.org/) for memory leak check and [siege](https://www.joedog.org/siege-home/) for pressure test.\n\n### Required\n\n```shell\n# cmake and make\nsudo apt-get install cmake make\n# libuv\ngit clone https://github.com/libuv/libuv.git\ncd libuv\nsh autogen.sh \u0026\u0026 sh autogen.sh\n./configure\nmake\nmake check\nsudo make install\n```\n\n### Optional\n\n```shell\n# json-c\nsudo apt-get install libjson0 libjson0-dev\n# sqlite3\nsudo apt-get install sqlite3 libsqlite3-dev\n# redis\nsudo apt-get install redis-server\n# hiredis\ngit clone https://github.com/redis/hiredis.git\ncd hiredis\nmake\nsudo make install\n# grequests\nsudo pip install grequests\n```\n\n#### If install hiredis error\n\nmodify `adapters/libuv.h` as follow and try again:\n\n1. add `#include \u003cstdlib.h\u003e` to first line.\n2. find `static int redisLibuvAttach(redisAsyncContext* ac, uv_loop_t* loop)` and delete `static`.\n\n# Usage\n\nsee [examples](https://github.com/loggerhead/lhttpd/tree/master/examples) or [test](https://github.com/loggerhead/lhttpd/tree/master/test) for details.\n\n```shell\n./install.sh examples\n./install.sh test\n```\n\n## API\n\nsee defines in [lhttpd.in.h](https://github.com/loggerhead/lhttpd/blob/master/include/lhttpd.in.h).\n\n## Request Routing\n\nInspired by the [bottle](http://bottlepy.org/docs/dev/tutorial.html#request-routing).\n\n# LICENSE\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floggerhead%2Flhttpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floggerhead%2Flhttpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floggerhead%2Flhttpd/lists"}