{"id":15873795,"url":"https://github.com/eun/http-server-action","last_synced_at":"2025-03-16T04:30:45.756Z","repository":{"id":37828628,"uuid":"388426148","full_name":"Eun/http-server-action","owner":"Eun","description":"An action that spawns an http server to serve files.","archived":false,"fork":false,"pushed_at":"2024-11-06T16:09:52.000Z","size":314,"stargazers_count":12,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T22:09:43.710Z","etag":null,"topics":["actions","github-actions","hacktoberfest"],"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/Eun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["Eun"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":"eun","otechie":null,"custom":null}},"created_at":"2021-07-22T10:44:14.000Z","updated_at":"2024-11-06T16:09:55.000Z","dependencies_parsed_at":"2023-10-11T10:33:26.393Z","dependency_job_id":"4764db32-03a7-4737-85bf-0dc7b82713c7","html_url":"https://github.com/Eun/http-server-action","commit_stats":{"total_commits":32,"total_committers":7,"mean_commits":4.571428571428571,"dds":0.5,"last_synced_commit":"c1d40b524d22c25b09da0fa92da05a3cf8175409"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eun%2Fhttp-server-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eun%2Fhttp-server-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eun%2Fhttp-server-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eun%2Fhttp-server-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eun","download_url":"https://codeload.github.com/Eun/http-server-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826788,"owners_count":20354220,"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":["actions","github-actions","hacktoberfest"],"created_at":"2024-10-06T01:06:41.342Z","updated_at":"2025-03-16T04:30:45.751Z","avatar_url":"https://github.com/Eun.png","language":"JavaScript","readme":"# http-server-action\n---\nAn action that spawns an http server to serve files. \n\n## Inputs\n### `directory`\nPath that should be served (default is `.`) (*optional*)\n\n### `port`\nPort that should be used (default is `8080`) (*optional*)\n\n### `no-cache`\nNo-Cache determiantes wheter the server sets the Cache-Control header or not (default is `false`) (*optional*)\n\n### `index-files`\nIf set and directory is requested, look for those files, instead of show directory listing (default is EMPTY, sample is `[\"index.html\", \"index.htm\"]`) (*optional*)\n\n### `allowed-methods`\nThrow HTTP-Error 405 on other methods than the methods given (default is `[\"GET\", \"HEAD\"]`) (*optional*)\n\n### `content-types`\nA JSON object of content-types that should be served (*optional*)\nDefault:\n```json\n{\n  \"appcache\": \"text/cache-manifest\",\n  \"css\": \"text/css\",\n  \"gif\": \"image/gif\",\n  \"html\": \"text/html\",\n  \"ico\": \"image/x-icon\",\n  \"jpeg\": \"image/jpeg\",\n  \"jpg\": \"image/jpeg\",\n  \"js\": \"text/javascript\",\n  \"json\": \"application/json\",\n  \"png\": \"image/png\",\n  \"txt\": \"text/plain\",\n  \"xml\": \"text/xml\"\n}\n```\n### `log`\nCreate a log file with the given name (default is ``, which means no logging) (*optional*)\n\n### `logTime`\nInclude the time of access in the log file (default is `true`) (*optional*)\n\n### `custom404Page`\nPath of the custom 404 page shown is the requested page is not found\n\n## Example\n```yaml\nsteps:\n  -\n    name: Checkout code\n    uses: actions/checkout@v4\n  -\n    name: Serve Files\n    uses: Eun/http-server-action@v1\n    with:\n      directory: ${{ github.workspace }}\n      port: 8080\n      no-cache: false\n      index-files: |\n        [\"index.html\", \"index.htm\"]\n      allowed-methods: |\n        [\"GET\", \"HEAD\"]\n      content-types: |\n        {\n          \"appcache\": \"text/cache-manifest\",\n          \"css\": \"text/css\",\n          \"gif\": \"image/gif\",\n          \"html\": \"text/html\",\n          \"ico\": \"image/x-icon\",\n          \"jpeg\": \"image/jpeg\",\n          \"jpg\": \"image/jpeg\",\n          \"js\": \"text/javascript\",\n          \"json\": \"application/json\",\n          \"png\": \"image/png\",\n          \"txt\": \"text/plain\",\n          \"xml\": \"text/xml\"\n        }\n      log: \"log.txt\"\n      logTime: \"false\"\n      custom404Page: \"/404.html\"\n  -\n    run: |\n      curl -vvvv http://localhost:8080/index.html\n      cat log.txt\n```\n","funding_links":["https://github.com/sponsors/Eun","https://issuehunt.io/r/eun"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feun%2Fhttp-server-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feun%2Fhttp-server-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feun%2Fhttp-server-action/lists"}