{"id":19059383,"url":"https://github.com/evertonsavio/nodejs-express-framework","last_synced_at":"2025-04-24T06:16:00.207Z","repository":{"id":42678405,"uuid":"474634119","full_name":"evertonsavio/nodejs-express-framework","owner":"evertonsavio","description":"Code base repository for my students use as reference for JavaScript exercices. Node.js \u0026 Express.","archived":false,"fork":false,"pushed_at":"2022-05-23T19:11:51.000Z","size":41,"stargazers_count":3,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T06:15:51.128Z","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/evertonsavio.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":"2022-03-27T12:41:46.000Z","updated_at":"2022-05-10T22:29:44.000Z","dependencies_parsed_at":"2022-08-26T21:40:45.894Z","dependency_job_id":null,"html_url":"https://github.com/evertonsavio/nodejs-express-framework","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertonsavio%2Fnodejs-express-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertonsavio%2Fnodejs-express-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertonsavio%2Fnodejs-express-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertonsavio%2Fnodejs-express-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evertonsavio","download_url":"https://codeload.github.com/evertonsavio/nodejs-express-framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573360,"owners_count":21452352,"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":[],"created_at":"2024-11-09T00:08:50.275Z","updated_at":"2025-04-24T06:16:00.168Z","avatar_url":"https://github.com/evertonsavio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Express Server  \n\n\u003e install dependencies:\n```\nnpm install express\nnpm install cors\n```\n\n\u003e Create a start script on package.json file:\n```\n  \"scripts\": {\n    \"start\": \"node src/app.js\"\n  },\n```\n\n### 01 Running a minimal express server  \n\u003e run the server\n```\nnpm install\nand\nnpm start\nor\nnode src/server.js\n```\n\n---\n### 02 First endpoint (Text/plain Hello World)\n```\ncurl -X GET http://localhost:4001/\n```\n\n### 03 POST data to the server\n```\ncurl -X POST http://localhost:4001/ -H 'Content-Type: application/json' -d \"{\\\"temperature\\\": 42}\"\n```\n\n### 04 GET data saved on server \u0026 DELETE endpoint\n```\ncurl -X DELETE http://localhost:4001/\n```\n\n### 05 Changing object values with PUT and query \u0026 path parameters\n```\ncurl -X PUT http://localhost:4001/\u003ctemperature\u003e?id=\u003cid\u003e\n```\n\n### 06 Path paramenters Vs Query parameters\n```\ncurl -X GET http://localhost:4001/\u003cid\u003e\ncurl -X DELETE http://localhost:4001/query?id=\u003cid\u003e\n```\n\n### 07 Separation of Concerns (SOC) Temperature routes\n```\ncurl -X POST http://localhost:4001/temperature -H 'Content-Type: application/json' -d \"{\\\"temperature\\\": \u003cvalue\u003e}\"\ncurl -X GET http://localhost:4001/temperature\ncurl -X GET http://localhost:4001/temperature/\u003cid\u003e\ncurl -X PUT http://localhost:4001/temperature/\u003ctemperature\u003e?id=\u003cid\u003e\ncurl -X DELETE http://localhost:4001/temperature\ncurl -X DELETE http://localhost:4001/temperature/query?id=\u003cid\u003e\n```\n\n### 08 Server Side Render\n```\nchrome: http://localhost:4001/\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevertonsavio%2Fnodejs-express-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevertonsavio%2Fnodejs-express-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevertonsavio%2Fnodejs-express-framework/lists"}