{"id":17932671,"url":"https://github.com/semrash/be-nc-news","last_synced_at":"2025-04-03T10:44:30.953Z","repository":{"id":243659062,"uuid":"118380842","full_name":"SemraSh/BE-nc-news","owner":"SemraSh","description":"NC-news","archived":false,"fork":false,"pushed_at":"2019-03-12T12:13:12.000Z","size":131,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-09T00:19:03.663Z","etag":null,"topics":["news","northcoders"],"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/SemraSh.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":"2018-01-21T22:50:12.000Z","updated_at":"2024-06-10T10:58:10.000Z","dependencies_parsed_at":"2024-06-19T03:33:36.115Z","dependency_job_id":null,"html_url":"https://github.com/SemraSh/BE-nc-news","commit_stats":null,"previous_names":["semrash/be-nc-news"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SemraSh%2FBE-nc-news","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SemraSh%2FBE-nc-news/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SemraSh%2FBE-nc-news/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SemraSh%2FBE-nc-news/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SemraSh","download_url":"https://codeload.github.com/SemraSh/BE-nc-news/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246989494,"owners_count":20865306,"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":["news","northcoders"],"created_at":"2024-10-28T21:28:37.458Z","updated_at":"2025-04-03T10:44:30.938Z","avatar_url":"https://github.com/SemraSh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Northcoders News API\n### About\nA RESTful API for Northcoders News. Built using Node.js (v8.9.1), Express.js (v4.16.2), MongoDB (v5.6.0) and Mongoose(v5.0.1).\n \nThis API has been deployed to Heroku [here](https://nc--news.herokuapp.com).\n\n### Set Up\n\nCheck if `node.js` is already installed by typing the following command on your terminal:\n```\nnode -v\n```\n\n\u003e If you do not already have Node.js installed please follow the instructions on [this guide](https://nodejs.org/en/download/package-manager/).\n\nCheck if `npm` is already installed by typing the following command on your terminal:\n```\nnpm -v\n```\n\u003eIf you do not have npm already installed please follow [this guide](https://www.npmjs.com/get-npm) to set it up.\n\nCheck if `git` is installed on your machine enter the following command on your terminal:\n```\ngit --version\n```\n\u003eIf you do not already have git installed on your machine please follow [this guide](https://git-scm.com/).\n\nCheck if `MongoDB` is installed on your machine enter the following command on your terminal:\n```\nnpm -v MongoDB\n```\n\n\u003eIf you do not have `MongoDB` already installed, please follow [this guide](https://docs.mongodb.com/manual/installation/).\n\nCheck if `mongoose` is installed on your machine enter the following command on your terminal:\n```\nnpm list mongoose\n```\n\n\u003eIf you do not have `mongoose` already installed, please follow [this guide](https://www.npmjs.com/package/mongoose).\n\n\n### Installation\n\nTo run this project you will need to clone it onto your local machine and install all dependencies.\n\nTo do so use the command line to navigate to your preferred directory on your local machine and enter the following command on the terminal:\n```\ngit clone https://github.com/SemraSh/BE-nc-news\n```\nNavigate inside the folder and install all dependencies by entering the following command on your terminal window:\n```\nnpm install\n```\nEnter the following command in your terminal window to connect to the database and keep it running:\n```\nmongod\n```\nOpen another terminal window, navigate inside the project folder and enter the following command to populate the database:\n```\nnode seed/seed.js\n```\nFinally to run the server enter the following command in your terminal window:\n```\nnpm start\n```\nThis will run the server on port 3000. All endpoints can be found locally on http://localhost:3000 .\n\n### Testing\nTo test the API navigate to the project directory and enter the following command\n```\nnpm test\n```\nTesting was carried out using `Mocha`, `Chai` and `Supertest`\n\n### API routes\n-----\n\n#### GET\n\n```\n/api/topics\n```\nGet all the topics\n\n```\n/api/topics/:topic/articles\n```\nGet article by topic name\n\n```\n/api/articles?page=1\n```\nGet first 10 articles. Increase the page number by 1 to get the next 10 articles\n\n```\n/api/articles/:article_id\n```\nGet article by article id.\n\n```\n/api/articles/:article_id/comments\n```\nGet all comments for one article.\n\n```\n/api/users\n```\nGet all the users\n\n```\n/api/users/:username\n```\nGet user by user name.\n\n```\n/api/comments\n```\nGet all the comments\n\n```\n/api/comments/:comment_id\n```\nGet one comment by comment id.\n\n-----\n#### POST\n```\n/api/topics/:topic/articles\n```\nPost a new article under the topic\n\n```\n/api/articles/:article_id/comments\n```\nPost new comment for the article.\n\n\n-------\n#### PUT\n```\n/api/articles/:article_id\n```\nUpdate vote for article.\n\n```\n/api/comments/:comment_id\n```\nUpdate vote of the comment.\n\n-------\n#### DELETE\n```\n/api/comments/:comment_id\n```\nDelete comment.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemrash%2Fbe-nc-news","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemrash%2Fbe-nc-news","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemrash%2Fbe-nc-news/lists"}