CRUD using Mongo - manirajmohareer/Advanced-Software-Engineering GitHub Wiki

CRUD operations using Mongo DB


Technologies used are

Local Mongo DB, Monk for establishing connection, Node Express App and Yelp API for fetching business data

MongoDB

MongoDB provides rich semantics for reading and manipulating data. CRUD stands for create, read, update, and delete. These terms are the foundation for all interactions with the database.

Monk

A tiny layer that provides simple yet substantial usability improvements for MongoDB usage within Node.JS like Mongoose.

Node Express App

YELP Fusion

YELP Provides different APIs like Search API, Business API, Business Match API,Auto Complete API , Phone Search API, Event lookup API and Event Search API

For the assignment search API is used. Inorder to fetch the json data of restaurants in the given city, Client ID and Client secret are generated.

The Client ID and Client Secret are passed to the Postman through the OAuth 2.0's body to get the Access Token.

When we search for key word kansas, the json data is fetched, from the data only selected restaurants are added to interested restaurants lists. A document in the Mongo DB is created as a collection by name restdata. The values are inserted into the collection.

In the MongoDB folder in the local machine ,following log files are generated for every insertion into the collection.

Once the restaurants are added to the rest data , user can view his interests, delete them if he wants. The interests page before deletion is as follows

After Deletion

Key Challenge: The method of using the client ID and Client Secret in the Yelp API has been deprecated and the generation of Access token was key challenge. The views are generated using the JADE which is similar to HTML5 but it uses indentation similar to python unlike other mark up languages.