{"id":17749613,"url":"https://github.com/oresoftware/express-istanbul","last_synced_at":"2025-05-08T20:01:54.149Z","repository":{"id":95712303,"uuid":"110936606","full_name":"ORESoftware/express-istanbul","owner":"ORESoftware","description":"Simple Node.js Express server that handles GET and POST of Istanbul test coverage data, using Istanbul standard middleware.","archived":false,"fork":false,"pushed_at":"2018-05-30T03:55:03.000Z","size":2,"stargazers_count":4,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-02T00:26:02.530Z","etag":null,"topics":["expressjs","istanbul","istanbuljs","nodejs","test-coverage"],"latest_commit_sha":null,"homepage":"","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/ORESoftware.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-16T07:11:41.000Z","updated_at":"2019-10-02T00:32:52.000Z","dependencies_parsed_at":"2023-05-21T14:53:00.813Z","dependency_job_id":null,"html_url":"https://github.com/ORESoftware/express-istanbul","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fexpress-istanbul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fexpress-istanbul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fexpress-istanbul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fexpress-istanbul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ORESoftware","download_url":"https://codeload.github.com/ORESoftware/express-istanbul/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253141474,"owners_count":21860541,"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":["expressjs","istanbul","istanbuljs","nodejs","test-coverage"],"created_at":"2024-10-26T11:23:55.693Z","updated_at":"2025-05-08T20:01:53.954Z","avatar_url":"https://github.com/ORESoftware.png","language":"JavaScript","readme":"\n### Purpose\n\nThis server will display test coverage data. The data is stored in the /coverage directory\n\n\u003cp\u003e\n\nStart the server, HTTP POST some data to the server, and then `GET localhost:6969/coverage`\n\n### Installing\n\n```javascript\ngit clone https://github.com/ORESoftware/express-istanbul.git\nnpm install\n```\n\n\n## Running the server\n\n`node index.js` or `node .` for short\n\n\n### Sending coverage \n\nHTTP POST your coverage data to this server, using code of this nature:\n\n\n```javascript\n\nexports.loadCoverage = function (driver, yourHost, yourPort) {\n\n  return async function(cb) {\n\n    await driver.switchTo().defaultContent();\n    let obj = await driver.executeScript('return window.__coverage__;');\n\n    let str = JSON.stringify(obj);\n    let options = {\n      port: 6969,\n      host: 'localhost',\n      path: '/coverage/client',\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/json',\n      }\n    };\n    \n    let req = http.request(options, res =\u003e {\n\n      let data = '';\n      // you *must* listen to data event\n      // so that the end event will fire...\n      res.on('data', d =\u003e {\n        data += d;\n      });\n\n      res.once('end', function () {\n       // Finished sending coverage data\n       cb();  // fire the final callback\n      });\n    });\n    \n    req.write(str);\n    req.end();\n\n  }\n\n};\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fexpress-istanbul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foresoftware%2Fexpress-istanbul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fexpress-istanbul/lists"}