{"id":16629112,"url":"https://github.com/bradgarropy/node-only-server","last_synced_at":"2026-04-29T08:33:36.450Z","repository":{"id":93266011,"uuid":"95997838","full_name":"bradgarropy/node-only-server","owner":"bradgarropy","description":"Simple web server and REST API using only Node.","archived":false,"fork":false,"pushed_at":"2017-07-14T06:26:24.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-03T01:37:35.812Z","etag":null,"topics":["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-02T02:28:45.000Z","updated_at":"2020-04-22T19:07:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2ed344e-cc3d-4c4c-a47d-9be50dfc8fa9","html_url":"https://github.com/bradgarropy/node-only-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bradgarropy/node-only-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradgarropy%2Fnode-only-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradgarropy%2Fnode-only-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradgarropy%2Fnode-only-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradgarropy%2Fnode-only-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradgarropy","download_url":"https://codeload.github.com/bradgarropy/node-only-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradgarropy%2Fnode-only-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32417767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["html","javascript","node","nodejs","rest","rest-api","web-app","web-application","web-server"],"created_at":"2024-10-12T04:39:40.528Z","updated_at":"2026-04-29T08:33:36.428Z","avatar_url":"https://github.com/bradgarropy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web Server \u0026 REST API Using Only Node\n\n*Learning about the world of JavaScript can be incredibly daunting.  \nLearning [NodeJS](https://nodejs.org/) is even worse.*\n\nSo I decided to write a basic web server and REST API using only [Node](https://nodejs.org/). No express, no pug, no MongoDB, nothing.\n\nMy aim was to understand what [Node](https://nodejs.org/) had to offer on its own, and do my best to create a standard web API using just that. I figured somewhere along the way I'd understand why all of these extra modules are so nice to have.\n\nAnd indeed I did.\n\n\n## Lessons Learned\n\nRoute parsing is a bitch using only the basic modules.\n\nNext iteration of this project will include [Express](https://expressjs.com/) for it's excellent route parsing and middleware options.\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-only-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradgarropy%2Fnode-only-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradgarropy%2Fnode-only-server/lists"}