{"id":23695897,"url":"https://github.com/tkdeng/simplewebserver","last_synced_at":"2026-01-22T14:30:16.013Z","repository":{"id":269873188,"uuid":"908713786","full_name":"tkdeng/simplewebserver","owner":"tkdeng","description":"Generate a simple website with static pages and easily add APIs to your server with gofiber.","archived":false,"fork":false,"pushed_at":"2025-02-06T18:08:12.000Z","size":1891,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T19:23:43.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/tkdeng.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-12-26T19:06:18.000Z","updated_at":"2025-02-06T18:07:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"56bcea02-b9a5-48f1-9216-82ecc6d65d7c","html_url":"https://github.com/tkdeng/simplewebserver","commit_stats":null,"previous_names":["tkdeng/simplewebserver"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdeng%2Fsimplewebserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdeng%2Fsimplewebserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdeng%2Fsimplewebserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdeng%2Fsimplewebserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkdeng","download_url":"https://codeload.github.com/tkdeng/simplewebserver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239763648,"owners_count":19692812,"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-12-30T05:57:46.926Z","updated_at":"2026-01-22T14:30:15.929Z","avatar_url":"https://github.com/tkdeng.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Web Server\n\nCompile HTML and MD template files together into a static html website.\n\nThis module uses [gofiber](https://github.com/gofiber/fiber) and [staticweb](https://github.com/tkdeng/staticweb/) to create a quick and easy setup for a simple web server.\n\nFor extra performance, consider adding the `pages.dist` directory to a cdn (like cloudflare pages) to serve static html pages.\n\n## Installation\n\n```shell\n# install the go module\ngo get github.com/tkdeng/simplewebserver\n\n# install dependencies\nmake\n```\n\n## Dependencies\n\n### Debian/Ubuntu (Linux)\n\n```shell script\n  sudo apt install libpcre3-dev\n```\n\n### Fedora (Linux)\n\n```shell script\n  sudo dnf install pcre-devel\n```\n\n### Arch (Linux)\n\n```shell script\n  sudo yum install pcre-dev\n```\n\n## Usage\n\n```go\n\nimport (\n  server \"github.com/tkdeng/simplewebserver\"\n)\n\nfunc main(){\n  // create new server\n  app, err := server.New(\"./app\")\n\n  //note: page.dist files will automatically be statically rendered,\n  // and take priority over gofiber methods\n\n  // do normal gofiber stuff (optional)\n  app.Get(\"/api\", func(c fiber.Ctx) error {\n    return c.SendString(\"Hello, API!\")\n  })\n\n  //note: page.dist files will automatically be statically rendered,\n  // and take priority over gofiber methods\n  app.Get(\"/\", func(c fiber.Ctx) error {\n    // this will be ignored if index.html exists\n    return c.SendString(\"Hello, World!\")\n  })\n\n  // listen with openssl (default port: [http: 8080, ssl: 8443])\n  err = app.Listen()\n}\n```\n\n## Inside App Directory\n\n### config.yml\n\n```yaml\ntitle: \"Web Server\"\napp_title: \"WebServer\"\ndesc: \"A Web Server.\"\n\npublic_uri: \"/public/\"\n\nport_http: 8080\nport_ssl: 8443\n\norigins: [\n  \"localhost\",\n  \"example.com\",\n]\n\nproxies: [\n  \"127.0.0.1\",\n  \"192.168.0.1\",\n]\n\nDebugMode: no\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkdeng%2Fsimplewebserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkdeng%2Fsimplewebserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkdeng%2Fsimplewebserver/lists"}