Skip to content

Latest commit

 

History

History
90 lines (56 loc) · 1.4 KB

README.md

File metadata and controls

90 lines (56 loc) · 1.4 KB

NC News (Backend)

by Umair Ahmed

To see a deployed version of this, please visit:

https://umair-ncnews-be.herokuapp.com/

Getting Started

Please ensure you have the latest version of NODE installed, v8.4 or above.

Installing

Open your terminal, navigate to the folder where you want to keep the files and type:

git clone https://github.com/ahmedu007/BE-NC_News.git

cd BE-NE_News

npm install

npm start

Then open your browser and navigate to http://localhost:4000/

Seeding the Database

Before running the server or the tests ensure that mongodb is running on your local machine. You can do that by running

mongod

on your bash terminal.

To seed the database run

npm run seed-db

and to seed the test database

npm run seed-test-db

Running the tests

To run all the tests

npm test

Built With

  • ExpressJS - The server framework used
  • MongoDB - The Database for storing information
  • Mongoose - Mongodb object modeling for node.js

List of Available Routes

GET

  • /api/topics
  • /api/articles
  • /api/users/:username
  • /api/topics/:topic_id/articles
  • /api/articles/:article_id/comments

POST

  • /api/articles/:article_id/comments

PUT

  • /api/articles/:article_id
  • /api/comments/:comment_id

DELETE

  • /api/comments/:comment_id