/blog-api

Primary LanguageJavaScript

Blog API

Setup

  • fork and clone this repo
  • npm install
  • run node seed.js from the command line to setup your database (you'll need to have mongod running in the background)
  • to remove data from your database, run mongo from the command line, then use blog-api. run db.posts.remove() to remove all posts, or db.authors.remove() to remove all authors. You can always run node seed.js again to re-seed the database
  • download Postman if you haven't already. It will be helpful for testing your api

API Endpoints

Create an api with the following endpoints:

Bonuses

  • refactor your routes to use express router
  • Create a 'tag search' field. add an index.html file with a text input box. When you type something into the input box and hit 'Submit', your API should search all your posts for any posts that have a tag that matches the input text