Code Monkey home page Code Monkey logo

northcoders_news_sprint's Introduction

Northcoders News Back-End

API for the reddit-style northcoders news, using Node.js, express and a MongoDB. The API is hosted on heroku here.

The website using this API is hosted on heroku here.

Getting Started

To run this back-end on your local machine for development and testing purposes follow these guidelines.

Prerequisites

Built on Node.js v8.6.0 and MongoDB v3.4.10. You will need Node.js and MongoDB installed locally.

Open your terminal window to check versions

$ node --version
$ mongod --version

Instructions

Via your terminal window, clone this code onto your machine, go to the folder and install dependencies

$ npm install

Make sure a local MongoDB instance is running on port 27017

$ mongod

Seed the database

$ node seed/seed.js

The process can take up to a couple of minutes to complete as there is a lot of data. Once the process is complete you will see the log line 'Database Seeded' and the node process will exit.

Launch API

Execute

$ npm install

And when finished

$ npm start

The following routes will be available in your localhost:3001

Routes

GET /api/topics
GET /api/topics/:topic_id/articles
GET /api/articles
GET /api/articles/:article_id/
GET /api/articles/:article_id/comments
POST /api/articles/:article_id/comments
PATCH /api/articles/:article_id
PUT /api/comments/:comment_id
DELETE /api/comments/:comment_id
GET /api/users/:username
GET /api/users/:username/repos

Running the tests

Run the tests in the mocha test environment

$ npm test

Built With

Authors

Acknowledgments

  • Northcoders coding bootcamp
  • Reddit

northcoders_news_sprint's People

Contributors

kgodsmark avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.