{"id":22674582,"url":"https://github.com/ttibbs/be-nc-news","last_synced_at":"2026-04-12T06:31:48.556Z","repository":{"id":257872219,"uuid":"872345595","full_name":"TTibbs/be-nc-news","owner":"TTibbs","description":"Express RESTful API server created as part of a Digital Skills Bootcamp in Software Engineering provided by Northcoders.","archived":false,"fork":false,"pushed_at":"2024-12-26T04:31:53.000Z","size":529,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T13:23:13.018Z","etag":null,"topics":["backend","database-design","database-migrations","database-schema","debugging","deployment","environment-variables","expressjs","hosting","javascript","jest","middleware","nodejs","postgresql-database","render","restful-api","supabase","supertest","testing"],"latest_commit_sha":null,"homepage":"https://be-nc-news-92aj.onrender.com/api","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/TTibbs.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":"2024-10-14T09:23:52.000Z","updated_at":"2024-12-26T04:31:56.000Z","dependencies_parsed_at":"2024-10-19T12:21:53.111Z","dependency_job_id":"c9cd14d7-ab81-4e36-b5ab-64ce575e1a0d","html_url":"https://github.com/TTibbs/be-nc-news","commit_stats":null,"previous_names":["ttibbs/be-nc-news"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TTibbs%2Fbe-nc-news","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TTibbs%2Fbe-nc-news/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TTibbs%2Fbe-nc-news/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TTibbs%2Fbe-nc-news/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TTibbs","download_url":"https://codeload.github.com/TTibbs/be-nc-news/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246181715,"owners_count":20736610,"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":["backend","database-design","database-migrations","database-schema","debugging","deployment","environment-variables","expressjs","hosting","javascript","jest","middleware","nodejs","postgresql-database","render","restful-api","supabase","supertest","testing"],"created_at":"2024-12-09T17:17:09.034Z","updated_at":"2026-04-12T06:31:43.517Z","avatar_url":"https://github.com/TTibbs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003c!-- Typing SVG by DenverCoder1 - https://github.com/DenverCoder1/readme-typing-svg --\u003e\n  \u003ca href=\"https://git.io/typing-svg\"\u003e\u003cimg src=\"https://readme-typing-svg.demolab.com?font=Ubuntu\u0026weight=700\u0026size=28\u0026duration=4000\u0026pause=1000\u0026color=188EF7\u0026background=FFFFFF00\u0026center=true\u0026vCenter=true\u0026random=false\u0026width=435\u0026lines=Backend%20News%20Server;Built%20With%20Express.js;Using%20PostgreSQL%20and%20SupaBase\" alt=\"Typing SVG\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis is a backend server for a news application built with **Express.js** and **PostgreSQL**. The server provides API endpoints for managing news articles, topics, users, and comments. It supports CRUD operations and can be extended for various features such as user authentication, pagination, and more.\n\n## Live View\n\nYou can view the API live and view the endpoints that are available [here](https://be-nc-news-92aj.onrender.com/api)\n\nThe frontend [repository](https://github.com/TTibbs/nc-news) - the live demo can be seen [here](https://nc-news-ten.vercel.app/articles?p=1)\n\n## Quick Tip:\n\nFor a better experience viewing JSON responses, install a browser extension like [JSON Formatter](https://chromewebstore.google.com/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en)\n\n## Table of Contents\n- [Technologies](#technologies)\n- [Installation](#installation)\n- [Environment Variables](#environment-variables)\n- [Endpoints](#endpoints)\n- [Running the Server](#running-the-server)\n\n## Technologies Used\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://devicon.dev/\"\u003e\u003cimg width=\"45\" height=\"45\" src=\"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/vscode/vscode-original.svg\" alt=\"visual-studio-code-2019\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://devicon.dev/\"\u003e\u003cimg width=\"45\" height=\"45\" src=\"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/git/git-original.svg\" alt=\"git\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://devicon.dev/\"\u003e\u003cimg width=\"45\" height=\"45\" src=\"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/nodejs/nodejs-original-wordmark.svg\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://devicon.dev/\"\u003e\u003cimg width=\"45\" height=\"45\" src=\"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/javascript/javascript-original.svg\" alt=\"javascript\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://devicon.dev/\"\u003e\u003cimg width=\"45\" height=\"45\" src=\"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/jest/jest-plain.svg\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://devicon.dev/\"\u003e\u003cimg width=\"45\" height=\"45\" src=\"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/postgresql/postgresql-original.svg\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://devicon.dev/\"\u003e\u003cimg width=\"45\" height=\"45\" src=\"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/supabase/supabase-plain.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/TTibbs/be-nc-news.git\ncd be-nc-news\nnpm install\n```\n\n## Set up the database:\nEnsure you have PostgreSQL installed locally or use a hosted database such as **Supabase**.\n\nIf using Supabase:\n\n- Sign up at [Supabase](https://supabase.com/)\n- Create a new project and retrieve your database URL.\n\n## Seed the database:\n\n- For development:\n```bash\nnpm run seed\n```\n\n- For production:\n```bash\nnpm run seed-prod\n```\n\n## Environment Variables\n\nSet up the following .env files for different environments:\n\n.env.development\n```makefile\nPGDATABASE=your_development_database_name\n```\n\n.env.test\n```makefile\nPGDATABASE=your_test_database_name\n```\n\n.env.production\n```makefile\nDATABASE_URL=your_supabase_database_url\n```\n\nNotes:\n- PGDATABASE is for local development and testing.\n- DATABASE_URL is used in production (e.g., when deploying to Render).\n- Ensure .env.* is added to .gitignore to avoid exposing credentials.\n\n## Endpoints\n\n| Method  | Endpoint | Description |\n| ------------- | ------------- | ------------- |\n| GET  | /api | Lists all available endpoints |\n| GET  | /api/users  | Lists all users  |\n| GET  | /api/topics  | Lists all topics  |\n| GET  | /api/articles  | Lists all articles  |\n| GET  | /api/articles/:article_id  | View an article by its ID  |\n| GET  | /api/articles/:article_id/comments  | View comments on an article by its ID  |\n| POST  | /api/articles/:article_id/comments  | Creates a new comment on the article  |\n| PATCH  | /api/articles/:article_id  | Updates the votes on an article  |\n| DELETE  | /api/comments/:comment_id  | Deletes a comment by its ID  |\n\n## Running the Server and Seeding\n\nYou need to make sure you have these minimum versions of node.js and postgres in order for the project to run successfully:\n\n- Node.js ^22.5.1\n- Postgres ^14.13\n\nTo start the server:\n\n```bash\nnpm run start\n```\n\nIf you want to include more functionality and tests, you can run them with:\n\n```bash\nnpm test\n--- or shorthand\nnpm t\n```\n\n--- \n\nThis portfolio project was created as part of a Digital Skills Bootcamp in Software Engineering provided by [Northcoders](https://northcoders.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttibbs%2Fbe-nc-news","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttibbs%2Fbe-nc-news","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttibbs%2Fbe-nc-news/lists"}