{"id":24514951,"url":"https://github.com/kociumba/kserver","last_synced_at":"2026-05-07T12:31:34.489Z","repository":{"id":242155523,"uuid":"808828436","full_name":"kociumba/Kserver","owner":"kociumba","description":"A fully customisable server written in go driven by YAML ⚙️ or dynamic LUA 🌕 configuration","archived":false,"fork":false,"pushed_at":"2024-07-08T12:59:31.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T10:30:48.504Z","etag":null,"topics":["go","golang","lua","server","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kociumba.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}},"created_at":"2024-05-31T23:11:21.000Z","updated_at":"2024-07-08T12:59:53.000Z","dependencies_parsed_at":"2024-06-01T00:39:13.862Z","dependency_job_id":"00f38b4d-b8eb-4452-873e-a084a1f484ea","html_url":"https://github.com/kociumba/Kserver","commit_stats":null,"previous_names":["kociumba/kserver"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kociumba/Kserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kociumba%2FKserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kociumba%2FKserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kociumba%2FKserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kociumba%2FKserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kociumba","download_url":"https://codeload.github.com/kociumba/Kserver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kociumba%2FKserver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32737640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"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":["go","golang","lua","server","yaml"],"created_at":"2025-01-22T01:15:20.088Z","updated_at":"2026-05-07T12:31:34.462Z","avatar_url":"https://github.com/kociumba.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kserver\n \nA proof of concept server that can be configured with YAML ⚙️ or LUA 🌕\n\n## Usage\n\nFor YAML create a `kserver.yml` file in the directory you want to serve, \nthe file should look like this:\n\n```yaml copy\n# yaml-language-server: $schema=https://raw.githubusercontent.com/kociumba/kserver/main/.kserver\n\nport: 8080\n\nhandlers:\n- route: /\n  content: ./index.html\n  contentType: text/html\n# Add more routes here, in VSCode you can use ctrl+space to autocomplete the array\n```\n\n\u003e[!NOTE]\n\u003e There is a YAML schema availible if you include the top comment, which allows for autocomplete in VSCode.\n\n\u003e [!TIP]\n\u003e**To use lua configuration, pass the `-lua` flag to `kserver`**\n\u003e\n\u003e*There is no way to set the port in lua so you can use `-port: INT` to configure it or use the default `8000`*\n\nFor LUA create a `kserver.lua` file in the directory you want to serve,\nthe file should look like this:\n\n```lua copy\nlocal routes = {\n    -- It's important to keep the order of these parameteres otherwise the server will confuse them\n    {route = \"/\", content = \"./index.html\", contentType = \"text/html\"},\n    -- Add more routes here\n}\n\nRegister_routes(routes)\n```\n\nIf you need custom logic before registering you can add it before the call to Register_routes(routes) or replace it with this:\n\n```lua copy\n\nfor i, r in ipairs(routes) do\n    local route = route.new(r.route, r.content, r.contentType, r.handler)\n    if not route then\n        error(\"Failed to create route\")\n    end\n    local success, err = pcall(function()\n        local result = registerRoutes(route)\n        if not result then\n            error(\"Failed to register route: \" .. r.route)\n        end\n    end)\n    if not success then\n        error(\"Error registering route: \" .. err)\n    end\nend\n```\n\n\u003e[!NOTE]\n\u003e Register_routes and registerRoutes will show up as undefined as they are created at runtime when the server starts.\n\n## Planned features\n\n- Support for custom endpoint logic with the lua configuration :trollface:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkociumba%2Fkserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkociumba%2Fkserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkociumba%2Fkserver/lists"}