{"id":13693373,"url":"https://github.com/icyleaf/salt","last_synced_at":"2025-05-02T21:31:55.489Z","repository":{"id":136301448,"uuid":"111758177","full_name":"icyleaf/salt","owner":"icyleaf","description":"**Unmaintained** A Human Friendly Interface for HTTP server written in Crystal.","archived":true,"fork":false,"pushed_at":"2018-11-19T06:10:29.000Z","size":100,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-12T19:41:25.214Z","etag":null,"topics":["crystal","webserver","webserver-interface"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/icyleaf.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}},"created_at":"2017-11-23T03:21:34.000Z","updated_at":"2023-01-28T17:44:11.000Z","dependencies_parsed_at":"2023-07-24T07:16:04.169Z","dependency_job_id":null,"html_url":"https://github.com/icyleaf/salt","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyleaf%2Fsalt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyleaf%2Fsalt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyleaf%2Fsalt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyleaf%2Fsalt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icyleaf","download_url":"https://codeload.github.com/icyleaf/salt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252108915,"owners_count":21696157,"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":["crystal","webserver","webserver-interface"],"created_at":"2024-08-02T17:01:09.019Z","updated_at":"2025-05-02T21:31:55.206Z","avatar_url":"https://github.com/icyleaf.png","language":"Crystal","funding_links":[],"categories":["Web Servers"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"salt icon\" src=\"./icon.svg\" width=\"240\" height=\"240\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A Human Friendly Interface for HTTP webservers written in Crystal.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Project Status\" src=\"https://img.shields.io/badge/status-WIP-yellow.svg\"\u003e\n  \u003ca href=\"https://crystal-lang.org/\"\u003e\u003cimg alt=\"Langugea\" src=\"https://img.shields.io/badge/language-crystal-776791.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/icyleaf/salt/blob/master/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/icyleaf/salt.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \"Salt\" icon by Creative Stall from \u003ca href=\"https://thenounproject.com\"\u003eNoun Project\u003c/a\u003e.\n\u003c/p\u003e\n\n## Installation\n\nAdd this to your application's `shard.yml`:\n\n```yaml\ndependencies:\n  salt:\n    github: icyleaf/salt\n    branch: master\n```\n\n## Usage\n\n```crystal\nrequire \"salt\"\nrequire \"salt/middlewares/session/cookie\"\nrequire \"salt/middlewares/logger\"\n\nclass Talk \u003c Salt::App\n  def call(env)\n    env.session.set(\"username\", \"icyleaf\")\n    env.logger.info(\"Start Talking!\")\n    {400, { \"Content-Type\" =\u003e \"text/plain\" }, [\"Can I talk to salt?\"]}\n  end\nend\n\nclass Shout \u003c Salt::App\n  def call(env)\n    call_app(env)\n\n    env.logger.debug(\"Shout class\")\n    {status_code, headers, body.map \u0026.upcase }\n  end\nend\n\nclass Speaking \u003c Salt::App\n  def call(env)\n    call_app(env)\n\n    env.logger.debug(\"Speaking class\")\n    {200, headers, [\"This is Slat speaking! #{env.session.get(\"username\")}\"]}\n  end\nend\n\nSalt.use Salt::Session::Cookie, secret: \"\u003cchange me\u003e\"\nSalt.use Salt::Logger, level: Logger::DEBUG, progname: \"app\"\nSalt.use Shout\nSalt.use Speaking\n\nSalt.run Talk.new\n```\n\n## Available middleware\n\n- [x] `ShowExceptions`\n- [x] `CommonLogger`\n- [x] `Logger`\n- [x] `Runtime`\n- [x] `Session` (Cookie/Redis)\n- [x] `Head`\n- [x] `File`\n- [x] `Directory`\n- [x] `Static`\n- [ ] `SendFile`\n- [x] `ETag`\n- [x] `BasicAuth`\n- [x] `Router` (lightweight)\n\nAll these components use the same interface, which is described in detail in the Salt::App specification. These optional components can be used in any way you wish.\n\n## How to Contribute\n\nYour contributions are always welcome! Please submit a pull request or create an issue to add a new question, bug or feature to the list.\n\nAll [Contributors](https://github.com/icyleaf/salt/graphs/contributors) are on the wall.\n\n## You may also like\n\n- [halite](https://github.com/icyleaf/halite) - HTTP Requests Client with a chainable REST API, built-in sessions and loggers.\n- [totem](https://github.com/icyleaf/totem) - Load and parse a configuration file or string in JSON, YAML, dotenv formats.\n- [markd](https://github.com/icyleaf/markd) - Yet another markdown parser built for speed, Compliant to CommonMark specification.\n- [poncho](https://github.com/icyleaf/poncho) - A .env parser/loader improved for performance.\n- [popcorn](https://github.com/icyleaf/popcorn) - Easy and Safe casting from one type to another.\n- [fast-crystal](https://github.com/icyleaf/fast-crystal) - 💨 Writing Fast Crystal 😍 -- Collect Common Crystal idioms.\n\n## Resouces\n\nHeavily inspired from Ruby's \u003ca href=\"https://github.com/rack/rack\"\u003erack\u003c/a\u003e gem.\n\n## License\n\n[MIT License](https://github.com/icyleaf/salt/blob/master/LICENSE) © icyleaf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficyleaf%2Fsalt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficyleaf%2Fsalt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficyleaf%2Fsalt/lists"}