Case Studies


RestFul App



See challenge See the source code

Challenge:
Build an app that reads, create, update, and deletes data.

    In this exercise i used:

  • Plain JavaScript
  • Node.js
  • Express (JS framework)
  • MongoDB (Database)
  • Mongoose (JS framework)
  • Cloud9 (Online IDE)
  • Postman (testing APIs)
  • The purpose of this exercise was to be able to map HTTP routes and CRUD (create, read, update, and destroy) using the seven Restful Routes pattern.

    -this app has the following:
  • Lists all the entries / home page (GET)
  • Let the user create blog posts and upload images (CREATE)
  • Show each item individually and show you all the info (GET:item:id)(RED)
  • Let the users edit the posts and use html for such the code is sanitized so no scripts on the input (/:id/edit)
  • Update the content and redirects (UPDATE)
  • Delete content permanently (DESTROY)

  • This exercise as basic as it might seem enfolds very powerful concepts, and I’m surely looking foward to advance for the next level with a more complex app using this technologies.

Result:
See the source code

  • Scope of Work
  • Building the API routes
  • Create question routes
  • Create answer routes
  • Connecting with MongoDB through Mongoose
  • model data for the API
  • Create the Schema
  • Connecting the API to the database
  • Update routes
  • Testing
Visit Site

Carla's Hub