{"id":26347250,"url":"https://github.com/survi218/node-express","last_synced_at":"2026-04-05T20:40:40.246Z","repository":{"id":139643324,"uuid":"93246836","full_name":"survi218/node-express","owner":"survi218","description":"Express framework","archived":false,"fork":false,"pushed_at":"2017-06-03T19:25:13.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-07T20:46:28.856Z","etag":null,"topics":["body-parser","express-middleware","expressjs","http-requests","http-response","nodejs","nodejs-modules","postman","rest-api","router","yargs"],"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-06-03T12:30:44.000Z","updated_at":"2017-06-03T19:28:30.000Z","dependencies_parsed_at":"2023-07-23T08:01:39.960Z","dependency_job_id":null,"html_url":"https://github.com/survi218/node-express","commit_stats":null,"previous_names":["survi218/node-express"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/survi218/node-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fnode-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fnode-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fnode-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fnode-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/survi218","download_url":"https://codeload.github.com/survi218/node-express/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/survi218%2Fnode-express/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31449835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T15:22:31.103Z","status":"ssl_error","status_checked_at":"2026-04-05T15:22:00.205Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["body-parser","express-middleware","expressjs","http-requests","http-response","nodejs","nodejs-modules","postman","rest-api","router","yargs"],"created_at":"2025-03-16T07:16:20.287Z","updated_at":"2026-04-05T20:40:40.214Z","avatar_url":"https://github.com/survi218.png","language":"JavaScript","readme":"# node-expressjs\n* Express framework to implement similar functionality as implemented by the HTTP module based   servers in the previous exercise. At the end of this exercise, you will be able to:\n  - Implement a simple web server using Express framework\n  - Implement a web server that serves static content\n# A Simple Server using Express\n  - Create a folder named node-express at a convenient location on your computer and move to     that folder.\n   - Copy the public folder from node-http to this folder.\n   - Create a file named server-1.js and add the following code to it:\n\n````\nvar express = require('express'),\n     http = require('http');\n\nvar hostname = 'localhost';\nvar port = 3000;\n\nvar app = express();\n\napp.use(function (req, res, next) {\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\n});\n\nvar server = http.createServer(app);\n\nserver.listen(port, hostname, function(){\n  console.log(`Server running at http://${hostname}:${port}/`);\n});\n````\n\nThen, install the Express framework in the folder by typing the following at the prompt:\n\n````\n     npm install express --save\n````\n\nStart the server by typing the following at the prompt, and then interact with the server:\n\n````\n     node server-1\n````\n\nServing Static Files\nCreate a file named server-2.js and add the following code to it:\n\n````\nvar express = require('express');\nvar morgan = require('morgan');\n\nvar hostname = 'localhost';\nvar port = 3000;\n\nvar app = express();\n\napp.use(morgan('dev'));\n\napp.use(express.static(__dirname + '/public'));\n\napp.listen(port, hostname, function(){\n  console.log(`Server running at http://${hostname}:${port}/`);\n});\n````\n\nThen, install morgan by typing the following at the prompt:\n````\n npm install morgan --save\n````\n\nStart the server and interact with it and observe the behavior.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurvi218%2Fnode-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurvi218%2Fnode-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurvi218%2Fnode-express/lists"}