{"id":16625579,"url":"https://github.com/aleclarson/slush","last_synced_at":"2026-04-24T21:31:21.551Z","repository":{"id":66178085,"uuid":"85781732","full_name":"aleclarson/slush","owner":"aleclarson","description":"Basic HTTP server for NodeJS","archived":false,"fork":false,"pushed_at":"2018-12-22T16:43:08.000Z","size":100,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-14T15:04:50.320Z","etag":null,"topics":["nodejs","nodejs-framework","nodejs-server"],"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/aleclarson.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,"zenodo":null}},"created_at":"2017-03-22T03:39:13.000Z","updated_at":"2018-12-22T16:43:00.000Z","dependencies_parsed_at":"2023-02-20T17:46:03.426Z","dependency_job_id":null,"html_url":"https://github.com/aleclarson/slush","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/aleclarson/slush","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fslush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fslush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fslush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fslush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleclarson","download_url":"https://codeload.github.com/aleclarson/slush/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fslush/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32241549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["nodejs","nodejs-framework","nodejs-server"],"created_at":"2024-10-12T04:06:15.729Z","updated_at":"2026-04-24T21:31:21.546Z","avatar_url":"https://github.com/aleclarson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slush v3.2.1 ![stable](https://img.shields.io/badge/stability-stable-4EBA0F.svg?style=flat)\n\nLightweight replacement to `express`.\n\n```coffee\nslush = require \"slush\"\n\napp = slush()\n\napp.ready -\u003e\n  console.log \"Listening at http://localhost:\" + app.port\n```\n\n### Options\n\n- **sock: String?** Listen on a socket path\n- **port: Number?** If undefined, default to `process.env.PORT`, or `443` (if HTTPS), or `8000` (if HTTP)\n- **secure: Boolean?** If true, an HTTPS server is created with `ssl.key` and `ssl.crt` from the project root\n- **maxHeaders: Number?** Limit the number of headers (defaults to 50)\n- **timeout: Number?** The timeout (in ms) before a request sends a 408 response\n- **onError: Function?** Send a custom response when your server throws an unexpected error\n- **onUnhandled: Function?** Send a custom response when a request goes unhandled\n\n### Request handling\n\nThe `slush` server uses a pipeline of request handlers (called \"pipes\").\n\n```coffee\napp.pipe (req, res) -\u003e\n  # Handle the request in here.\n  # Calls to `pipe` can be chained.\n```\n\nThe return value of each pipe is used to determine the server's next action.\n\nReturn `undefined` or `null` to skip the rest of the current pipe.\n\nReturn a `Number` literal to set the status code for an empty response.\n\nReturn an `Error` instance for invalid requests.\n\nReturn a `Promise` instance for asynchronous requests.\nThe resolved value is treated the same as synchronous return values.\n\nThe server will visit each pipe in the pipeline until `res.send` is called.\nIf that never happens, the server responds with \"404 Not Found\".\n\nIf an `Error` instance is thrown while inside a pipe, the server responds with \"500 Internal Error\".\n\n### Express middleware\n\nSupport for `express` middleware is included.\n\n```coffee\napp.use middleware\n```\n\n### The `drain` method\n\nUse the `drain()` method for running code after the response is sent.\n\n```coffee\napp.drain (req, res) -\u003e\n  # The response has been sent.\n```\n\n### Server events\n\n- `request: (req, res)` A request was received\n- `response: (req, res)` A response has finished\n- `requestError: (error)` The request handler caught an error (not emitted when `options.onError` is defined)\n- `error: ()` A server error occurred [(see here)](https://nodejs.org/api/net.html#net_event_error)\n- `close: ()` The server has closed, all connections have ended [(see here)](https://nodejs.org/api/net.html#net_event_close)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleclarson%2Fslush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleclarson%2Fslush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleclarson%2Fslush/lists"}