{"id":19164359,"url":"https://github.com/senchalabs/spark","last_synced_at":"2025-05-07T19:09:34.155Z","repository":{"id":977604,"uuid":"777716","full_name":"senchalabs/spark","owner":"senchalabs","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-14T17:18:36.000Z","size":26,"stargazers_count":226,"open_issues_count":9,"forks_count":28,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-07T19:02:57.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/senchalabs.png","metadata":{"files":{"readme":"README.markdown","changelog":"CHANGELOG","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":"2010-07-15T22:22:52.000Z","updated_at":"2025-01-05T12:34:15.000Z","dependencies_parsed_at":"2022-07-08T22:00:41.385Z","dependency_job_id":null,"html_url":"https://github.com/senchalabs/spark","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/senchalabs%2Fspark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senchalabs%2Fspark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senchalabs%2Fspark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senchalabs%2Fspark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/senchalabs","download_url":"https://codeload.github.com/senchalabs/spark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252940932,"owners_count":21828769,"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":[],"created_at":"2024-11-09T09:21:34.298Z","updated_at":"2025-05-07T19:09:33.555Z","avatar_url":"https://github.com/senchalabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spark\n\nSpark is a command-line tool used to start up node server instances written by [Tj Holowaychuk](http://github.com/visionmedia) and [Tim Caswell](http://github.com/creationix).  It's part of the [Connect](http://github.com/senchalabs/connect) framework, however can be used standalone with _any_ node server.\n\n__NOTE__: spark is no longer maintained, for an extensible, and more robust solution check out [Cluster](http://learnboost.github.com/cluster).\n\n## Features\n\nSpark provides the following options when starting a server.\n\n - Port/Host to listen on\n - SSL hosting with specified key/certificate\n - Automatic child process spawning for multi-process node servers that share a common port.\n - User/Group to drop to after binding (if run as root)\n - Environment modes (development/testing/production)\n - Modify the node require paths\n - Can load any of these configs from from a file (optionally grouped by env)\n - Can change the working directory before running the app\n - `--comment` option to label processes in system tools like `ps` or `htop`\n - Pass arbitrary code or environment variables to the app\n\n## Making an app spark compatible\n\nAny node server can be used with spark.  All you need to do it create a file called `app.js` that exports the instance of `http.Server` or `net.Server`.\n\nA hello-world example would look like this:\n\n    module.exports = require('http').createServer(function (req, res) {\n        res.writeHead(200, {\"Content-Type\":\"text-plain\"});\n        res.end(\"Hello World\");\n    });\n\nAnd then to run it you simply go to the folder containing the `app.js` and type:\n\n    $ spark\n\nThe output you'll see will be:\n\n    Spark server(34037) listening on http://*:3000 in development mode\n\nWhere `34037` is the process id. If you want 4 processes to balance the requests across, no problem.\n\n    $ spark -n 4\n\nAnd you'll see:\n\n    Spark server(34049) listening on http://*:3000 in development mode\n    Spark server(34050) listening on http://*:3000 in development mode\n    Spark server(34052) listening on http://*:3000 in development mode\n    Spark server(34051) listening on http://*:3000 in development mode\n\n## MIT License\n\nCopyright (c) 2010 Sencha Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenchalabs%2Fspark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsenchalabs%2Fspark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenchalabs%2Fspark/lists"}