Here's a link to the hosted version of Northcoders News API: NC_news Please note, it may takea few seconds for the API to load.
Welcome to my API project 👋. My goal is to build a backend service using Node.js and PostgreSQL which provides access to application data programmatically. Much like real-world backend services such as Reddit, my API will serve as the bridge between the front-end architecture and the underlying data storage.
My API encompasses various types of data essential for application functionality, including users, comments, articles, and topics. With endpoints designed for GET, POST, PATCH, and DELETE operations, developers can interact with these data entities efficiently and securely.
To get started with this project, follow these steps:
- Fork and clone the repository:
git clone https://github.com/Danilo-Piga/nc-news
- Create .env files:
Create two .env files in the root folder of the project, then add your environment variables to those files.
Test environment:
- .env.test -
PGDATABASE=data_base_test
Development environment:
- .env.development -
PGDATABASE=data_base_development
Find the required database names in setup.sql located here >
/db/setup.sql
- Install dependencies:
npm install
- Setup database
npm run setup-dbs
- Seed the local database:
npm run seed
- Run tests:
npm test app.test.js
To run this project, you'll need the following minimum versions:
Node.js (version 18.17.1)
PostgreSQL (version 14.10)