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.
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.
- Testing: Jest, Supertest (TDD)
- Backend: Express
- Database: PostgreSQL
- Hosting: Supabase (DB), Render (API)
- Node.js: v21.7.2 or above
- PostgreSQL: v14.11 or above
To run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/zairacodes/be-nc-news.git cd be-nc-news
-
Install dependencies:
npm install
-
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
.
- Create two
-
Set up the local databases:
npm run setup-dbs
-
Seed the local development database:
npm run seed
-
Run the tests:
npm test
-
Start the server:
npm start
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