{"id":16274988,"url":"https://github.com/sv443/node.js-http-encoding-example","last_synced_at":"2025-07-14T04:33:28.652Z","repository":{"id":97407838,"uuid":"235101728","full_name":"Sv443/Node.js-HTTP-Encoding-Example","owner":"Sv443","description":"An example of how content encoding works in Node.js HTTP servers","archived":false,"fork":false,"pushed_at":"2021-01-13T00:31:01.000Z","size":2311,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T16:32:03.456Z","etag":null,"topics":["brotli","deflate","encoding","gzip","html","http","http-server","javascript","js","node","nodejs","website","websites"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sv443.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2020-01-20T12:57:43.000Z","updated_at":"2023-04-15T15:35:31.000Z","dependencies_parsed_at":"2023-03-04T05:45:40.156Z","dependency_job_id":null,"html_url":"https://github.com/Sv443/Node.js-HTTP-Encoding-Example","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/Sv443/Node.js-HTTP-Encoding-Example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sv443%2FNode.js-HTTP-Encoding-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sv443%2FNode.js-HTTP-Encoding-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sv443%2FNode.js-HTTP-Encoding-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sv443%2FNode.js-HTTP-Encoding-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sv443","download_url":"https://codeload.github.com/Sv443/Node.js-HTTP-Encoding-Example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sv443%2FNode.js-HTTP-Encoding-Example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265240118,"owners_count":23732945,"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":["brotli","deflate","encoding","gzip","html","http","http-server","javascript","js","node","nodejs","website","websites"],"created_at":"2024-10-10T18:31:23.118Z","updated_at":"2025-07-14T04:33:28.601Z","avatar_url":"https://github.com/Sv443.png","language":"HTML","readme":"# Node.js HTTP Encoding Example\r\n## This is an example of how content encoding works with Node.js HTTP servers\r\n\u003cbr\u003e\u003cbr\u003e\r\n[WTFPL license](http://wtfpl.net/about/) - do whatever you wanna do with this code, you don't even have to credit me and there's no conditions whatsoever!\r\n\r\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\r\n\r\n# Instructions to install and run:\r\nDownload or clone the repository and follow these steps to set up and run the HTTP server:\r\n\r\n1. Make sure you have Node.js installed (minimum required Node version is `v11.7.0` - to find out your Node version, run `node -v` in a terminal)\r\n2. Open a terminal in the folder that contains the `package.json` file and run the command `node .` or `npm start`\r\n3. Open your browser and go to [http://localhost/](http://localhost/) or [http://127.0.0.1/](http://127.0.0.1/)\r\n\r\nTo stop the server, press \u003ckbd\u003e^C\u003c/kbd\u003e (\u003ckbd\u003eCTRL\u003c/kbd\u003e + \u003ckbd\u003eC\u003c/kbd\u003e)\r\n\r\n\u003cbr\u003e\u003cbr\u003e\r\n\r\n# Info:\r\nYou don't need to install any dependencies - all the libraries are natively installed in Node.js.  \r\nThis HTTP server example supports the encodings [Gzip](https://en.wikipedia.org/wiki/Gzip), [Deflate](https://en.wikipedia.org/wiki/DEFLATE) and [Brotli](https://en.wikipedia.org/wiki/Brotli).  \r\nIt uses file streams to further increase page loading time (files don't need to be completely loaded to RAM and then sent but rather get directly piped to the client).  \r\nAn example file called `test.html` is included, you can try modifying it if you want to (just remember to restart the server to see the changes).  \r\nIf you need any help, feel free to [join my Discord server](https://sv443.net/discord) and I will gladly help you out.  \r\nYou can find more information by looking at the [`index.js`](./index.js) file.  ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsv443%2Fnode.js-http-encoding-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsv443%2Fnode.js-http-encoding-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsv443%2Fnode.js-http-encoding-example/lists"}