Skip to content

Northcoders News API: access articles, topics, comments and users, simulating a Reddit-like service. Note: free plan may cause delays.

Notifications You must be signed in to change notification settings

zairacodes/be-nc-news

Repository files navigation

Northcoders News API

Hello there!

Thank you for your interest in my first back-end project.

You can explore the hosted version of the API here.
Please note that since this project is on a free plan, there may be delays of 50 seconds or more due to inactivity causing the server to spin down. Thanks for your patience.

Overview

The Northcoders News API serves as a platform for accessing and interacting with various articles, topics, comments and users, aiming to mimic a real-world backend service like Reddit.
This API serves as the backend for the NC News application, handling all server-side logic and database management. You can explore the front-end project here and the deployed app here.

API Endpoints Preview

be_nc_news

Tech Stack

  • Testing: Jest, Supertest (TDD)
  • Backend: Express
  • Database: PostgreSQL
  • Hosting: Supabase (DB), Render (API)

Getting Started

Prerequisites

Installing

To run the project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/zairacodes/be-nc-news.git
    cd be-nc-news
  2. Install dependencies:

    npm install
  3. Set up the environment variables:

    • Create two .env files in root directory: .env.test and .env.development.
    • In each file, add PGDATABASE= followed by the correct database name for that environment. Please refer to /db/setup.sql for the correct database names.
    • Please make sure the .env files are added to .gitignore.
  4. Set up the local databases:

    npm run setup-dbs
  5. Seed the local development database:

    npm run seed
  6. Run the tests:

    npm test
  7. Start the server:

    npm start

Useful Links

Feel free to reach out if you have any questions or feedback!


This portfolio project was created as part of a Digital Skills Bootcamp in Software Engineering provided by Northcoders

Made with ♥ by Zaira

About

Northcoders News API: access articles, topics, comments and users, simulating a Reddit-like service. Note: free plan may cause delays.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published