{"id":26347256,"url":"https://github.com/survi218/node-modules","last_synced_at":"2025-08-23T22:12:14.216Z","repository":{"id":139643342,"uuid":"92704183","full_name":"survi218/node-modules","owner":"survi218","description":"Node and the HTTP Module","archived":false,"fork":false,"pushed_at":"2017-06-03T12:37:29.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T21:57:38.624Z","etag":null,"topics":["callback-functions","error-handler","get","node-http","node-module","nodejs","npm","post","postman","requirejs","server-core"],"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/survi218.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-05-29T03:43:35.000Z","updated_at":"2017-06-03T12:30:06.000Z","dependencies_parsed_at":"2023-07-23T08:00:48.311Z","dependency_job_id":null,"html_url":"https://github.com/survi218/node-modules","commit_stats":null,"previous_names":["survi218/node-modules"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fnode-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fnode-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fnode-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fnode-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/survi218","download_url":"https://codeload.github.com/survi218/node-modules/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835926,"owners_count":20355616,"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":["callback-functions","error-handler","get","node-http","node-module","nodejs","npm","post","postman","requirejs","server-core"],"created_at":"2025-03-16T07:16:22.409Z","updated_at":"2025-03-16T07:16:22.932Z","avatar_url":"https://github.com/survi218.png","language":"JavaScript","readme":"# node-modules\n#Node modules: \n- HTTP, fs and path. At the end of this exercise, you will be able to:\n- Implement a simple HTTP Server\n- Implement a server that returns html files from a folder \n* A Simple HTTP Server\n  - Create a folder named node-http at a convenient location and move into the folder.\n  - In the node-http folder, create a subfolder named public.\n- Create a file named server-1.js and add the following code to it:\n\n````\nvar http = require('http');\n\nvar hostname = 'localhost';\nvar port = 3000;\n\nvar server = http.createServer(function(req, res){\n  console.log(req.headers);\n    res.writeHead(200, { 'Content-Type': 'text/html' });\n  res.end('\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eHello World\u003c/h1\u003e\u003c/body\u003e\u003c/html\u003e');\n  })\nserver.listen(port, hostname, function(){\n  console.log(`Server running at http://${hostname}:${port}/`);\n});\n````\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurvi218%2Fnode-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurvi218%2Fnode-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurvi218%2Fnode-modules/lists"}