{"id":20077575,"url":"https://github.com/digitaledgeit/js-simple-server-setup","last_synced_at":"2026-06-13T07:31:40.901Z","repository":{"id":25954521,"uuid":"29396220","full_name":"digitaledgeit/js-simple-server-setup","owner":"digitaledgeit","description":"A library for creating a simple server with little effort.","archived":false,"fork":false,"pushed_at":"2016-03-08T15:45:14.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T11:26:23.251Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitaledgeit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-17T16:00:41.000Z","updated_at":"2016-03-08T15:33:34.000Z","dependencies_parsed_at":"2022-08-06T08:00:25.387Z","dependency_job_id":null,"html_url":"https://github.com/digitaledgeit/js-simple-server-setup","commit_stats":null,"previous_names":["jameslnewell/simple-server-setup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/digitaledgeit/js-simple-server-setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-simple-server-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-simple-server-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-simple-server-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-simple-server-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitaledgeit","download_url":"https://codeload.github.com/digitaledgeit/js-simple-server-setup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-simple-server-setup/sbom","scorecard":{"id":342463,"data":{"date":"2025-08-11","repo":{"name":"github.com/digitaledgeit/js-simple-server-setup","commit":"194c3a8058bd895ac40311e0d552f8e77b2d06d7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T06:12:16.257Z","repository_id":25954521,"created_at":"2025-08-18T06:12:16.257Z","updated_at":"2025-08-18T06:12:16.257Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34276501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-13T15:09:04.322Z","updated_at":"2026-06-13T07:31:40.882Z","avatar_url":"https://github.com/digitaledgeit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-server-setup\n\nA library for creating a simple server with little effort.\n\nBootstrap an `express` app in just a few lines. Useful for testing scripts that use a HTTP client e.g.  [go-fetch](https://www.npmjs.com/package/go-fetch) or [browserbot](https://www.npmjs.com/package/browserbot).\n\n## Installation\n\n    npm install --save-dev simple-server-setup\n\n## Usage\n\nA simple HTTP server:\n\n```javascript\n\nconst server = require('simple-server-setup');\n\nserver.create(app =\u003e {\n\n    app.get('/', (req, res) =\u003e {\n      res.send('http - simple-server-setup');\n    });\n\n  })\n  .then(server =\u003e console.log(`Listening at ${server.url}`))\n;\n\n\n```\n\nA simple HTTPS server:\n\n```javascript\n\nconst server = require('simple-server-setup');\n\nconst options = {\n  secure: true,\n  key: __dirname + '/server.key',\n  cert: __dirname + '/server.cert'\n};\n\nserver.create(options, app =\u003e {\n\n    app.get('/', (req, res) =\u003e {\n      res.send('https - simple-server-setup');\n    });\n\n  })\n  .then(server =\u003e console.log(`Listening at ${server.url}`))\n;\n\n```\n\nA unit test to check the HTTP client has sent the Content-Type header:\n\n```javascript\n\nconst assert  = require('assert');\nconst client  = require('go-fetch');\nconst server  = require('simple-server-setup');\n\nit('should set the Content-Type', function (done) {\n\n  server.create(app =\u003e {\n    app.get('/', (req, res) =\u003e {\n      try {\n        assert.equal(req.headers['content-type'], 'text/x-foo');\n      } catch (err) {\n        done(err);\n      }\n      res.send('test - simple-server-setup');\n    });\n  })\n    .then(server =\u003e {\n      client().get(server.url, {'Content-Type': 'text/x-foo'}, (err, res) =\u003e {\n        if (err) throw err;\n        res.getBody().on('data', () =\u003e {/* do nothing */\n        });\n        res.getBody().on('end', () =\u003e server.close(done));\n      });\n\n    })\n    .catch(err =\u003e console.log(err))\n  ;\n\n});\n\n```\n\n## API\n\n### Methods\n\n#### .create([options], callback) : Promise\u003chttp.Server\u003e\n    \nCreate a new server with the specified options.\n\nOptions:\n\n\t @param   {Object}    [options]             The server options\n\t @param   {Boolean}   [options.host]        The server host - localhost\n\t @param   {Boolean}   [options.port]        The server port - 3000\n\t @param   {Boolean}   [options.keepAlive]   Whether the server should keep connections alive (turning this on will take longer for the server to shutdown between tests - false\n\t @param   {Boolean}   [options.secure]      Whether the server should serve requests on HTTPS - false\n\t @param   {Boolean}   [options.key]         The path to the server key - server.key\n\t @param   {Boolean}   [options.cert]        The path to the server certificate - server.cert\n\t @param   {Function}  callback              A function to configure the express instance\n    \n### Events\n\n## Miscellaneous\n\n### Generating a self-signed key and certificate for a HTTPS server\n\n    openssl req -nodes -new -x509 -keyout server.key -out server.cert\n     \n## Change log\n\n### 0.2.0\n\n- break: return a promise instead of an event emitter\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 James Newell\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaledgeit%2Fjs-simple-server-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitaledgeit%2Fjs-simple-server-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaledgeit%2Fjs-simple-server-setup/lists"}