{"id":19689917,"url":"https://github.com/recidvst/node-gnu-clacks","last_synced_at":"2025-02-27T08:43:25.532Z","repository":{"id":57311366,"uuid":"144634868","full_name":"Recidvst/node-gnu-clacks","owner":"Recidvst","description":"A man is not dead while his name is still spoken. Add an 'X-Clacks-Overhead' Header to your Node/Express app. ","archived":false,"fork":false,"pushed_at":"2024-02-17T22:31:01.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T01:04:28.823Z","etag":null,"topics":["express","headers","http","middleware","node","npm","npm-package","pratchett"],"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/Recidvst.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}},"created_at":"2018-08-13T21:18:43.000Z","updated_at":"2023-12-02T16:29:37.000Z","dependencies_parsed_at":"2025-01-10T08:33:49.105Z","dependency_job_id":"3f8b375f-963c-4269-81e2-5086a1884139","html_url":"https://github.com/Recidvst/node-gnu-clacks","commit_stats":null,"previous_names":["recidvst/node-gnu-terry-pratchett"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Recidvst%2Fnode-gnu-clacks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Recidvst%2Fnode-gnu-clacks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Recidvst%2Fnode-gnu-clacks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Recidvst%2Fnode-gnu-clacks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Recidvst","download_url":"https://codeload.github.com/Recidvst/node-gnu-clacks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240996150,"owners_count":19890906,"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":["express","headers","http","middleware","node","npm","npm-package","pratchett"],"created_at":"2024-11-11T19:03:41.198Z","updated_at":"2025-02-27T08:43:25.524Z","avatar_url":"https://github.com/Recidvst.png","language":"JavaScript","readme":"# Node/Express GNU Clacks\n\nA man is not dead while his name is still spoken. Add an 'X-Clacks-Overhead' Header to your vanilla Node or Express app.\n\nSee [http://www.gnuterrypratchett.com](http://www.gnuterrypratchett.com 'GNU Terry Pratchett')\n\n[![npm](https://img.shields.io/npm/dt/node-gnu-clacks.svg)]()\n[![npm](https://img.shields.io/npm/v/node-gnu-clacks.svg)]()\n[![license](https://img.shields.io/github/license/recidvst/node-gnu-clacks.svg)]()\n\n## Install\n\n- Install with [npm](https://www.npmjs.com/package/node-gnu-clacks 'node-gnu-clack on NPM') or download and create your own module.\n\n```js\nnpm install node-gnu-clacks --save\n```\n\n## Usage\n\n- Import the module and tell your app to use as middleware:\n\n```js\nconst { node: gnuHeaderNode } = require('node-gnu-clacks');\nconst { express: gnuHeaderExpress } = require('node-gnu-clacks');\n```\n\n_note: you can also use `const gnuHeader = require('node-gnu-clacks');` for express apps for backwards compatibility with v1._\n\n## Options\n\n**string[] ghosts = ['Terry Pratchett']**\n\nAdd an array of names to be passed. This is in addition to the default, 'Terry Pratchett', which will always be added.\n\n## Example with a vanilla Node app\n\n```js\nconst http = require('http');\nconst { node: gnuHeaderNode } = require('node-gnu-clacks');\n\nhttp\n  .createServer((req, res) =\u003e {\n    const addClacksHeader = gnuHeaderNode(['Moist', 'Adora', 'Reacher']);\n    addClacksHeader(res);\n\n    res.writeHead(200, { 'Content-Type': 'text/plain' });\n    res.end('A man is not dead while his name is still spoken.\\n');\n  })\n  .listen(3000);\n```\n\n## Example with an Express app\n\n```js\nconst express = require('lib/express');\nconst { express: gnuHeaderExpress } = require('node-gnu-clacks');\n\nconst app = express();\n\napp.use(gnuHeaderExpress());\nor;\napp.use(gnuHeaderExpress(['Moist', 'Adora', 'Reacher']));\n\napp.get('/', (req, res) =\u003e {\n  res.send('A man is not dead while his name is still spoken.');\n});\n\napp.listen(3000);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecidvst%2Fnode-gnu-clacks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecidvst%2Fnode-gnu-clacks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecidvst%2Fnode-gnu-clacks/lists"}