{"id":22066825,"url":"https://github.com/gift-stack/documentation-for-nodejs-app","last_synced_at":"2026-04-29T04:39:34.287Z","repository":{"id":182544902,"uuid":"357468329","full_name":"Gift-Stack/documentation-for-nodejs-app","owner":"Gift-Stack","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-13T07:51:59.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T18:33:07.064Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/Gift-Stack.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}},"created_at":"2021-04-13T07:50:40.000Z","updated_at":"2021-04-13T07:52:01.000Z","dependencies_parsed_at":"2023-07-20T12:30:41.933Z","dependency_job_id":null,"html_url":"https://github.com/Gift-Stack/documentation-for-nodejs-app","commit_stats":null,"previous_names":["gift-stack/documentation-for-nodejs-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Gift-Stack/documentation-for-nodejs-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gift-Stack%2Fdocumentation-for-nodejs-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gift-Stack%2Fdocumentation-for-nodejs-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gift-Stack%2Fdocumentation-for-nodejs-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gift-Stack%2Fdocumentation-for-nodejs-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gift-Stack","download_url":"https://codeload.github.com/Gift-Stack/documentation-for-nodejs-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gift-Stack%2Fdocumentation-for-nodejs-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261060134,"owners_count":23103985,"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-30T19:29:10.385Z","updated_at":"2026-04-29T04:39:29.256Z","avatar_url":"https://github.com/Gift-Stack.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Revie hypothetical platform (Node.js)\n\n\u003e Backend API\n\nThis allows users to sign up or log in and post reviews about the apartments\nthey've previously lived in. These reviews may include videos and/or images\ne(optional). They can give reviews about the landlord,the environment the\napartment is situated,and quality of the apartment.\n\nThese reviews can be uniquely marked by random visitors as helpful.\n\n# Usage\n\n\u003e For deployed link\n\n\u003c!-- -   Sign up route: /api/user\n-   Log in route: /api/auth\n-   View posts route: /api/post\n-   Auth user \u0026 get token route: /api/auth\n-   Add post route: /api/post\n-   Delete post route: /api/post\n-   View posts route: /api/post --\u003e\n\nRun this code here, in a console or from any site\n\nfetch(' https://immense-tor-81857.herokuapp.com/api/post ') .then(response =\u003e\nresponse.json()) .then(data =\u003e console.log(data))\n\nNB: This is a protected route. So you are required to sign up or log in, if\nyou've signed uo before, before viewing your posts\n\n# Routes\n\nHTTP methods supported are\n\n-   GET\n-   POST\n-   DELETE\n\n\u003e GET method\n\n-   /api/auth\n\nThis is used in the authentication route (/api/auth) for getting logged in\nuser's detail by sending the token generated using header(key: x-auth-token,\nvalue: 'token generated')\n\n-   /api/post\n\nThe GET method is also used in the post route('/api/post) for getting all of the\nuser's reviews for different apartments. This route is also private, therefore,\na header with \"x-auth-token\" : \"token generated\" key/value pair is required\nafter the Content-Type header.\n\n\u003e POST method\n\n-   /api/user\n\nThis is used in the user route (/api/user) for signing up a user. This route is\npublic, therefore, no token is required. The route takes in compulsory name,\nemail and password (which must be more than 6 letters)\n\n-   /api/auth\n\nThis method is also used in the authentication route(/api/auth) for logging in a\nuser. That is, after authenticating the user ( inputing the user's email and\npassword ), the token is sent back as a response to validate that user is logged\nin. This token is what is user to get the logged in user's reviews from the\ndatabase with get('https://immense-tor-81857.herokuapp.com/api/auth)\n\n-   /api/post\n\nLastly, the POST method is used to add new post to user's database ( /api/post\n). This route is private. This means can only ba accessed by logged in users.\nTherefore, token is required. The token can be sent using the \"x-auth-token\" :\n\"token generated from login\" key/value pair as header.\n\n\u003e DELETE\n\n-   /api/post/:id\n\nThis method is used to delete a review already posted. This route is only\navailable in the post route (/api/post/:id). Definitely, this route is private\nas only logged in user can access to delete a review. The token is required and\ncan be sent using the \"x-auth-token\" : \"token generated from login\" key/value\npair as header. NB: the :id in the route (/api/post/:id) should be gotten with\nthe (.params.id) parameter.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgift-stack%2Fdocumentation-for-nodejs-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgift-stack%2Fdocumentation-for-nodejs-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgift-stack%2Fdocumentation-for-nodejs-app/lists"}