This project is a backend API for a news website. It provides endpoints for retrieving, posting, updating, and deleting articles, comments, users and topics.
The hosted version of this API can be accessed at Winnie's NC News API (Backend).
To run this project locally, follow these steps:
-
Clone the repository:
git clone
https://github.com/WinnieLamS/winnie-be-nc-news -
Navigate to the project directory:
cd winnie-be-nc-news
-
Install dependencies:
npm install
-
Create
.env.development
and.env.test
files based on the.env-example
template provided. -
Create local databases by running the following script:
npm run setup-dbs
-
Seed the local development database:
npm run seed
-
Start the server:
npm start
-
The API should now be running locally at http://localhost:9090.
- Node.js v21.7.1 or higher
- PostgreSQL v10.0.0 or higher
To run tests, after npm install supertest
use the following command: npm test app
The API endpoints are documented in the code and can be accessed via the /api endpoint when the server is running. For detailed documentation, please refer to the comments and documentation provided in the codebase.
This portfolio project was created as part of a Digital Skills Bootcamp in Software Engineering provided by Northcoders