{"id":16528668,"url":"https://github.com/zetlen/creosote","last_synced_at":"2026-04-30T06:39:46.824Z","repository":{"id":146417570,"uuid":"48768597","full_name":"zetlen/creosote","owner":"zetlen","description":"⛔️ NOT WORKING a cycle.js driver for an express http server","archived":false,"fork":false,"pushed_at":"2016-01-04T13:33:11.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-30T06:39:45.441Z","etag":null,"topics":[],"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/zetlen.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-12-29T21:49:47.000Z","updated_at":"2016-03-19T15:42:53.000Z","dependencies_parsed_at":"2023-04-17T13:57:48.649Z","dependency_job_id":null,"html_url":"https://github.com/zetlen/creosote","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zetlen/creosote","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fcreosote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fcreosote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fcreosote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fcreosote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zetlen","download_url":"https://codeload.github.com/zetlen/creosote/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fcreosote/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32457110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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-10-11T17:41:09.899Z","updated_at":"2026-04-30T06:39:46.806Z","avatar_url":"https://github.com/zetlen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## creosote is a [Reactive](http://reactivex.org) interface for an [express](http://expressjs.com) server\n\n#### i hope, probably in vain, that this test is good enough documentation for now\n\n```js\n'use strict';\nconst Creosote = require('creosote');\nconst fetch = require('node-fetch');\nconst test = require('tape');\n\ntest('parses JSON from a post body', (t) =\u003e {\n  t.plan(1);\n  let creosote = Creosote({ port: process.env.PORT, expect: 'json' });\n  creosote.posts('/repos/:name/:tag')\n  .do(o =\u003e o.res.status(200).end())\n  .reduce(\n    (acc, c) =\u003e {\n      let name = c.params.name;\n      let tag = c.params.tag;\n      let out = Object.assign({}, acc);\n      out[name] = Object.assign({}, out[name]);\n      out[name][tag] = c.req.body;\n      return out;\n    },\n    {}\n  ).subscribe((statuses) =\u003e {\n    t.same(\n      statuses,\n      {\n        sam: {\n          '1.0.0': {\n            buildStatus: 'failed'\n          }\n        },\n        diane: {\n          '1.2.1': {\n            buildStatus: 'succeeded'\n          }\n        }\n      },\n      'json was parsed'\n    );\n  });\n  fetch(`http://localhost:${port}/repos/sam/1.0.0`, {\n    method: 'post',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({\n      buildStatus: 'failed'\n    })\n  })\n  .then(() =\u003e fetch(`http://localhost:${port}/repos/diane/1.2.1`, {\n    method: 'post',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({\n      buildStatus: 'succeeded'\n    })\n  }))\n  .then(() =\u003e creosote.unmount())\n  .catch(t.fail);\n});\n\ntest('parses form data from a post body', (t) =\u003e {\n  t.plan(1);\n  let creosote = Creosote({ port: process.env.PORT, expect: 'urlencoded' });\n  creosote.posts('/repos/:name/:tag')\n  .do(o =\u003e o.res.status(200).end())\n  .reduce(\n    (acc, c) =\u003e {\n      let name = c.params.name;\n      let tag = c.params.tag;\n      let out = Object.assign({}, acc);\n      out[name] = Object.assign({}, out[name]);\n      out[name][tag] = c.req.body;\n      return out;\n    },\n    {}\n  ).subscribe((statuses) =\u003e {\n    t.same(\n      statuses,\n      {\n        sam: {\n          '1.0.0': {\n            buildStatus: 'red',\n            commit: '12345'\n          },\n          '1.2.1': {\n            buildStatus: 'green',\n            commit: '67890'\n          }\n        }\n      },\n      'form data was parsed'\n    );\n  });\n  fetch(`http://localhost:${port}/repos/sam/1.0.0`, {\n    method: 'post',\n    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n    body: 'buildStatus=red\u0026commit=12345'\n  })\n  .then(() =\u003e fetch(`http://localhost:${port}/repos/sam/1.2.1`, {\n    method: 'post',\n    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n    body: 'buildStatus=green\u0026commit=67890'\n  }))\n  .then(() =\u003e creosote.unmount())\n  .catch(t.fail);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetlen%2Fcreosote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzetlen%2Fcreosote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetlen%2Fcreosote/lists"}