{"id":16629115,"url":"https://github.com/bradgarropy/node-express-server","last_synced_at":"2026-05-05T10:31:30.224Z","repository":{"id":93265982,"uuid":"96360582","full_name":"bradgarropy/node-express-server","owner":"bradgarropy","description":"Simple web server and REST API using Node \u0026 Express.","archived":false,"fork":false,"pushed_at":"2017-07-14T06:30:54.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-19T20:26:35.159Z","etag":null,"topics":["express","expressjs","html","javascript","node","nodejs","rest","rest-api","web-app","web-application","web-server"],"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/bradgarropy.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-07-05T20:57:25.000Z","updated_at":"2017-07-14T06:36:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"66319517-8096-4536-8bf8-d5ea4ee7b35d","html_url":"https://github.com/bradgarropy/node-express-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bradgarropy/node-express-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradgarropy%2Fnode-express-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradgarropy%2Fnode-express-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradgarropy%2Fnode-express-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradgarropy%2Fnode-express-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradgarropy","download_url":"https://codeload.github.com/bradgarropy/node-express-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradgarropy%2Fnode-express-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32645917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["express","expressjs","html","javascript","node","nodejs","rest","rest-api","web-app","web-application","web-server"],"created_at":"2024-10-12T04:39:40.875Z","updated_at":"2026-05-05T10:31:30.207Z","avatar_url":"https://github.com/bradgarropy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web Server \u0026 REST API Using Node \u0026 Express\n\n*Learning about the world of JavaScript can be incredibly daunting.  \nLearning [Node](https://nodejs.org/) is even worse.*\n\nThis is the second iteration of the [node-only-server](https://github.com/bradgarropy/node-only-server). With this version, I incorporated two additional modules: [express](https://expressjs.com/) and [body-parser](https://github.com/expressjs/body-parser). Still no database and no HTML templating.\n\n\n## Lessons Learned\n\nI found that the main impact by including [Express](https://expressjs.com/) was a much more streamlined process for defining routes. [Express](https://expressjs.com/) makes parsing the request method, url, headers, and body so much easier. It's use of the [path-to-regexp](https://www.npmjs.com/package/path-to-regexp) package is genius for quickly bringing up a REST API.\n\nHowever, my most awkward route oddly enough is the index page. This is because I'm using plain old template literals to populate an HTML page with dynamic data. [Express](https://expressjs.com/) does not provide HTML templating in its own framework, but rather relies on existing template engines to render views. So the next package I'm going to integrate is an HTML templating tool, like [pug](https://pugjs.org/), to help me out.\n\nI'm using [this article](https://strongloop.github.io/strongloop.com/strongblog/compare-javascript-templates-jade-mustache-dust/) to help me pick a template engine.\n\n\n## Project Iterations\n\n1. [node-only-server](https://github.com/bradgarropy/node-only-server)\n2. [node-express-server](https://github.com/bradgarropy/node-express-server)\n3. [node-express-pug-server](https://github.com/bradgarropy/node-express-pug-server)\n4. [node-express-pug-mongo-server](https://github.com/bradgarropy/node-express-pug-mongodb-server)\n\n\n## Features\n\nThis simple web application tracks weight measurements. It implements the following HTTP methods:\n\n* GET\n* POST\n* PATCH\n* DELETE\n\nIt also offers one page, the index, which shows the current weight entries.\n\n\n## Usage\n\nFirst, clone down the repository. Next, run the following command from inside the directory:\n\n`npm start` or `node server`\n\nIn order to access the index page, navigate to `localhost:3000` in your browser.\n\n\n## REST API\n\nUse your favorite REST client, mine is [Postman](https://www.getpostman.com/), to send requests to the server.\n\n### Retrieve Weight Entries\n```\nGET /api/weight\n```\n\n### Add Weight Entry\n```\nPOST /api/weight  \nParameters: { \"date\": \"2017-05-17\", \"weight\": 180 }\n```\n\n### Update Weight Entry\n```\nPATCH /api/weight/:date  \nParameters: { \"weight\": 180 }\n```\n\n### Remove Weight Entry\n```\nDELETE /api/weight/:date\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradgarropy%2Fnode-express-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradgarropy%2Fnode-express-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradgarropy%2Fnode-express-server/lists"}