{"id":25709222,"url":"https://github.com/mobskuchen/netpup","last_synced_at":"2026-02-21T09:02:40.721Z","repository":{"id":270621731,"uuid":"910946546","full_name":"MOBSkuchen/netpup","owner":"MOBSkuchen","description":"Minimal HTTP server","archived":false,"fork":false,"pushed_at":"2025-02-10T15:55:00.000Z","size":113,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-26T08:17:41.032Z","etag":null,"topics":["http","http-server","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/netpup","language":"Rust","has_issues":true,"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/MOBSkuchen.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-01T21:43:13.000Z","updated_at":"2025-04-06T22:03:24.000Z","dependencies_parsed_at":"2025-01-01T22:29:00.820Z","dependency_job_id":"fcd5b2a2-5d30-4717-a6af-850b72f26985","html_url":"https://github.com/MOBSkuchen/netpup","commit_stats":null,"previous_names":["mobskuchen/netdog"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/MOBSkuchen/netpup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MOBSkuchen%2Fnetpup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MOBSkuchen%2Fnetpup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MOBSkuchen%2Fnetpup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MOBSkuchen%2Fnetpup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MOBSkuchen","download_url":"https://codeload.github.com/MOBSkuchen/netpup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MOBSkuchen%2Fnetpup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29677881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["http","http-server","rust"],"created_at":"2025-02-25T09:29:09.587Z","updated_at":"2026-02-21T09:02:35.704Z","avatar_url":"https://github.com/MOBSkuchen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Netpup - Easy HTTP Server\n- Need a quick and dirty HTTP server? No problem!\n- Want to create static web pages? No problem!\n- Want to create client side webapps? No problem!\n\nNetpup can do all of that and more!\n\n## Getting started\n- Install netpup using cargo: ``cargo install netpup``\n\n- Or if you're on windows you can download Netpup from the releases page on the github page.\n\n- Or (for other platforms), you can build it from source.\n\nAfter installing, create your config toml file:\n\n```toml\nip = \"127.0.0.1\"                            # REQUIRED | IP.\nport = 5000                                 # OPTIONAL | Port. Defaults to 8080.\ncwd = \"/path/to/my/stuff\"                   # OPTIONAL | Set current working directory.\n\n[logger]                                    # OPTIONAL | Logger configuration.\nprint = true                                # OPTIONAL | Whether to print or not. Defaults to true.\nlog_file = 'logfile.log'                    # OPTIONAL | File to log to. If not specified, netpup will not log to a file.\n\n[routes.main]                               # New Route -\u003e \"main\" | Name must be unique, but is not important.\nmethods = [\"GET\"]                           # OPTIONAL | List of methods (GET, POST).\nurl = \"/\"                                   # REQUIRED | Url to access.\npath = \"mainpage.html\"                      # REQUIRED | Path to serve from.\ncontent_type = \"text/html\"                  # OPTIONAL | Specify response content type. Netpup willl try to infer this, if not provided\n\n# Make sure that routes with '*' come last\n[routes.resources]                          # New Route -\u003e \"resources\" | Name must be unique, but is not important.\nmethods = [\"GET\"]                           # OPTIONAL | List of methods (GET, POST).\nurl = \"/r/*\"                                # REQUIRED | Url to access. '*' means anything can come after that.\npath = \"/resources/*\"                       # REQUIRED | Path to serve from. '*' means that the '*' part of the url gets inserted here.\n\n[errors.404]                                # OPTIONAL | Route for Error 404's.\npath = \"errors/error_404.html\"              # REQUIRED | Path to serve from.\n```\n\nThen run `netpup my-config.toml` or `netpup` (config file path defaults to *config.toml*)\n\n## Dynamic loading\nInstead of serving a static file, netpup can run a lua program serve its output.\n\nJust provide the path to a lua file as a script in your route.\n```toml\n[routes.main]\nmethods = [\"GET\"]\nurl = \"/*\"\nscript = \"main_page.lua\"\n```\nYour lua program gets treated as a function:\n```lua\nret = {\n [\"code\"] = 200,\n [\"resp\"] = \"OK\",\n [\"headers\"] = {},\n [\"content\"] = read(\"logfile.log\"),\n [\"type\"] = \"html\"\n}\nlog_info(\"Hi (triggered from Lua)\")\nreturn ret\n```\n### Response format\nThe program must return a table in this format:\n- code: u16\n- resp: string,\n- headers: string = string,\n- content: string,\n- type: string (mine type)\n### Provided functions\nAdditionally, netpup provides the program with the following functions:\n- read(file_path: string) -\u003e string\n  - Reads a file to a string\n- write(file_path: string, content: string) -\u003e nil\n  - Writes a string to a file\n- log_info(message: string) -\u003e nil\n  - Logs a message as an info\n- log_error(message: string) -\u003e nil\n  - Logs a message as an error\n- log_fatal(message: string) -\u003e nil\n  - Logs a message as a fatal error and terminates the program","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobskuchen%2Fnetpup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobskuchen%2Fnetpup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobskuchen%2Fnetpup/lists"}