Skip to content

AmadReihun/be-nc-news

Repository files navigation

Northcoders News API

Table of Contents

  1. General Info
  2. Technologies
  3. Installation
  4. Connection
  5. Usage
  6. Collaboration

General Info

NC News API is a well made project which will allow users to to write articles with different topics. User can comment on articles and vote for their favourite ones. You will be able populate the data based on users, topics, comments, articles.


Link

https://nc-news-9ihg.onrender.com/api

Screenshot

endpoints

Technologies

NPM: Version 10.2.3

PSQL: Version 14.10

dotenv: Version 16.3.1

express: Version 4.18.2

express-json: Version 1.0.0

pg: Version 8.11.3

pg-format: Version 1.0.4

jest: Version 27.5.1

jest-extended: Version 2.0.0

jest-sorted: Version 1.0.14

supertest: Version 6.3.4


Installation

To Clone and install npm


git clone https://github.com/AmadReihun/be-nc-news.git
npm install

To install dependencies

npm install dotenv --save
npm install express
npm install express-json
npm install node-pg-format
npm install --save-dev jest
npm install --save-dev jest-extended
npm install --save-dev jest-sorted
npm install supertest --save-dev

Connection

You will need to add the below 2x files to your repo to be able to connect to the two databases locally.

.env.development

PGDATABASE=nc_news

.env.test

PGDATABASE=nc_news_test

Usage

To connect to the database

psql
\c nc_news_test

To run the database

npm run setup-dbs

To setup the dev database

npm run seed

To run test

npm run test

To run the app

npm run start

Collaboration

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Please do not hesitate to reach me for any suggestion on question.

About

backend project for northcoders

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 23