{"id":18894313,"url":"https://github.com/diruptio/spikedog","last_synced_at":"2026-03-19T06:59:53.837Z","repository":{"id":227904852,"uuid":"771698241","full_name":"Diruptio/Spikedog","owner":"Diruptio","description":"Spikedog is a lightweight open source HTTP server, optimized for web services and good performance.","archived":false,"fork":false,"pushed_at":"2025-01-31T01:15:23.000Z","size":343,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-31T02:22:57.495Z","etag":null,"topics":["backend","http-server"],"latest_commit_sha":null,"homepage":"https://api.diruptio.de","language":"Java","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/Diruptio.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-03-13T19:27:25.000Z","updated_at":"2025-01-21T21:58:12.000Z","dependencies_parsed_at":"2024-04-02T20:26:44.542Z","dependency_job_id":"54144714-1838-4316-8e04-891a8592aa61","html_url":"https://github.com/Diruptio/Spikedog","commit_stats":null,"previous_names":["diruptio/spikedog"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diruptio%2FSpikedog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diruptio%2FSpikedog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diruptio%2FSpikedog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diruptio%2FSpikedog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Diruptio","download_url":"https://codeload.github.com/Diruptio/Spikedog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239869218,"owners_count":19710485,"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":["backend","http-server"],"created_at":"2024-11-08T08:20:41.485Z","updated_at":"2026-02-27T08:30:16.224Z","avatar_url":"https://github.com/Diruptio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Made in Germany \u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_Germany.svg/2560px-Flag_of_Germany.svg.png\" width=\"20\"\u003e with love \u003cfont color=\"red\"\u003e❤\u003c/font\u003e and beer 🍺.\n# Spikedog\nSpikedog is a **lightweight** open source **HTTP server**, optimized for **web services** and good **performance**.\n## Requirements\n- Java 21 or higher\n## Install\nFolder Structure:\n- directory\n  - modules\n    - info-module.jar\n    - reload-module.jar\n  - Spikedog.jar\n  - start.sh\n### Linux (bash)\n1. Install Java 21 or higher (root required)\n   ```bash\n   sudo apt install openjdk-21-jdk\n   ```\n2. Install screen (root required)\n   ```bash\n   sudo apt install screen\n   ```\n3. Create an empty directory\n   ```bash\n   mkdir directory\n   cd directory\n   ```\n4. Download [Spikedog.jar](https://github.com/Diruptio/Spikedog/releases/latest/download/Spikedog.jar)\n   ```bash\n   wget https://github.com/Diruptio/Spikedog/releases/latest/download/Spikedog.jar\n   ```\n5. Create start.sh with following content:\n   ```bash\n   screen -dmS spikedog java -jar ./Spikedog.jar\n   ```\n6. Make shart.sh executable\n   ```bash\n   chmod +x start\n   ```\n7. Start the server\n   ```bash\n   ./start.sh\n   ```\n   You can attach to the screen using `screen -r spikedog` and detach with `Ctrl + A + D`.\n8. Autostart (optional)\u003cbr\u003e\n   Add the following line to ~/.profile:\n   ```bash\n   directory/start.sh\n   ```\n## Usage\n### Modules\nAll modules are located in the `modules` directory. The server will load all modules on startup.\u003cbr\u003e\nIf you wish to reload the modules at runtime, download [reload-module.jar](https://github.com/Diruptio/Spikedog/releases/latest/download/reload-module.jar) and place it in the `modules` directory.\u003cbr\u003e\nIf you wish to see all loaded modules and sites/servlets at runtime, download [info-module.jar](https://github.com/Diruptio/Spikedog/releases/latest/download/info-module.jar) and place it in the `modules` directory.\n### Module loading order\nIf you need to load a module before another module, you can create `order.txt` in your `modules` directory.\nThe files in `order.txt` will be loaded in the order they are listed and before the non-listed files. You also can use regular expressions in `order.txt`.\n## Module Development\n### Dependencies\nMaven:\n```xml\n\u003crepositories\u003e\n  \u003crepository\u003e\n    \u003curl\u003ehttps://repo.diruptio.de/repository/maven-public/\u003c/url\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n```xml\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003ediruptio\u003c/groupId\u003e\n    \u003cartifactId\u003eSpikedog\u003c/artifactId\u003e\n    \u003cversion\u003eVERSION\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\nGradle:\n```groovy\nrepositories {\n    maven { url = \"https://repo.diruptio.de/repository/maven-public/\" }\n}\n```\n```groovy\ndependencies {\n    implementation \"diruptio:Spikedog:VERSION\"\n}\n```\n### Example Module\nYou can view the [example code](https://github.com/Diruptio/Spikedog/tree/main/example) or follow this tutorial\n1. Create a Listener\u003cbr\u003e\n   Your Spikedog Listener must implement the `Listener` interface. It will be loaded automatically.\n   ```java\n   public class ExampleListener implements Listener {\n       @Override\n       public void onLoad(Module self) {\n           System.out.println(\"Loading example module\");\n       }\n   \n       @Override\n       public void onUnload() {\n           System.out.println(\"Unloading example module\");\n       }\n   }\n   ```\n2. Create a Servlet\n   ```java\n   public class ExampleServlet {\n       @Endpoint(path = \"/example\")\n       public void handle(HttpRequest request, HttpResponse response) {\n           response.content(\"Hello World!\");\n       }\n   }\n   ```\n3. Register your Servlet in the Listener\n   ```java\n   @Override\n   public void onLoad(Module self) {\n       System.out.println(\"Loading example module\");\n       \n       Spikedog.register(new ExampleServlet());\n   }\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiruptio%2Fspikedog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiruptio%2Fspikedog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiruptio%2Fspikedog/lists"}