{"id":19030085,"url":"https://github.com/statico/ifhttp","last_synced_at":"2025-04-23T15:55:54.536Z","repository":{"id":17890805,"uuid":"73530873","full_name":"statico/ifhttp","owner":"statico","description":"👾 HTTP REST server for Z-Machine interactive fiction","archived":false,"fork":false,"pushed_at":"2023-02-08T06:58:29.000Z","size":136,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T01:12:21.660Z","etag":null,"topics":["docker","http","http-server","if","inform","inform7","interactive-fiction","rest","z-machine","z8"],"latest_commit_sha":null,"homepage":"https://langworth.com/","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/statico.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}},"created_at":"2016-11-12T04:13:38.000Z","updated_at":"2024-02-26T20:39:12.000Z","dependencies_parsed_at":"2022-07-26T02:19:41.543Z","dependency_job_id":null,"html_url":"https://github.com/statico/ifhttp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statico%2Fifhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statico%2Fifhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statico%2Fifhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statico%2Fifhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statico","download_url":"https://codeload.github.com/statico/ifhttp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249341824,"owners_count":21254193,"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":["docker","http","http-server","if","inform","inform7","interactive-fiction","rest","z-machine","z8"],"created_at":"2024-11-08T21:16:28.285Z","updated_at":"2025-04-17T12:31:27.586Z","avatar_url":"https://github.com/statico.png","language":"JavaScript","readme":"# ifhttp\n\n[![license](https://img.shields.io/github/license/statico/ifhttp.svg?style=flat-square)](https://github.com/statico/ifhttp/blob/master/LICENSE)\n[![build status](https://img.shields.io/github/actions/workflow/status/statico/ifhttp/build.yml?branch=main\u0026style=flat-square)](https://ghcr.io/statico/ifhttp)\n\n**ifhttp** provides an HTTP REST interface for interacting with Z-Machine interactive fiction (IF) stories (typically `.z8` files). Clients can connect to the service to start a game and then POST commands to it. Sessions are deleted after a while in a feeble attempt to save memory. This service is definitely DoS-able.\n\n**See a live example on https://www.langworth.com/**\n\n## Usage\n\n    $ docker pull ghcr.io/statico/ifhttp\n    $ docker run -p 8080:8080 -v /path/to/stories:/data ghcr.io/statico/ifhttp npm run -s start -- /data/story.z8\n\n## API\n\nAll request and response bodies should be JSON. In addition to a status code, requests may return a JSON object with an `error` property which describes the error.\n\n### GET /new\n\nReturns a session ID for a new game.\n\nResponse:\n\n```json\n{\n  \"session\": \"\u003cid\u003e\",\n  \"output\": \"\u003ctext\u003e\"\n}\n```\n\n### POST /send\n\nSends a command to the game.\n\nRequest:\n\n```json\n{\n  \"session\": \"\u003cid\u003e\",\n  \"message\": \"\u003cuser input\u003e\"\n}\n```\n\nResponse:\n\n```json\n{\n  \"output\": \"\u003ctext\u003e\"\n}\n```\n\n## Reference\n\n- [Inform](http://inform7.com/) - IF creation toolsuite\n- [ifvms](https://github.com/curiousdannii/ifvms.js) - JavaScript Z-Machine VM used by this script\n- [ifplayer](https://github.com/jedi4ever/ifplayer.js) - Command-line client which uses ifvms\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatico%2Fifhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatico%2Fifhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatico%2Fifhttp/lists"}