Reviews and Ratings backend using Loopback.
Objective :- To have a working backend with required api’s for a stand alone authenticated reviews and ratings system.
- Programming language (nodejs)
- Framework strongloop ( strongloop )
- Database (in-memory)
Pre-requisites are :-
- Basic knowledge of REST api’s only.
- System with nodejs installed on it.
Github Repo “Github-repo-for-this-app” :- Github-repo-for-this-app
Model’s list
- HotelReview
- Images
- User
Models Relation ship :-
Steps 1. Install strongloop node module globally using npm:
npm install -g strongloop
Steps 2. Create a new loopback app using slc loopback:
slc loopback
Steps 3. Create a new loopback models app using slc loopback:model :
You have to create the 3 models mentioned above, hotel reviews (persisted model), images (persisted models) and reviewer (User) and have them as public, and add the required properties in each model as per the requirements, like title in hotelreview, url in image model.
slc loopback:model
Steps 4. Setup relations between the loopback models:
Now you have to setup the relations between each models as per the Models relation ship diagram.
slc loopback:relation
Steps 5. Run the node app using :
node .
Steps 6. check the api’s documentation at http://0.0.0.0:3000/explorer/ :
It will look something like this.
“Github-repo-for-this-app” :- Github-repo-for-this-app