I have recently written a guest blog about developing a MEAN stack application at http://javabeginnerstutorial.com.
Refer the link MEAN Comments Application to read that post.
Refer the link meanstack-comments-application for the code base.
I have developed a MEAN stack application which shows the San Francisco Food inspections details.
Source: Food Inspection(Use Food Inspections – LIVES Standard)
I have used Spark, Scala, MongoDB, NodeJs, AngularJs to do this.
My spark job reads the input CSV data contains food inspection details and processes it and stores the data in MongoDB as collections. I have allFoodInspection and filterFoodInspection collections here. The first one has all the data and the second one has the business name, the unique risk category and number of risk’s committed.
My MEAN stack REST layer reads the data from Mongodb and processes and exposes the data and the Web Layer uses the data and display it and use the data for drawing a chart.
Let us see how we can execute this.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list sudo apt-get update sudo apt-get install -y mongodb-org sudo service mongod start
Run the spark job with the below command
bin/spark-submit --class com.spark.SFFoodInspectionAnalysis --master local sf-food-inspection-spark-assembly-1.0.jar file:///usr/local/spark/Food_Inspections_-_LIVES_Standard.csv
show dbs use sfFood show collections db.allFoodInspection.find() db.filterFoodInspection.find()
npm install node server.js
Please are the some of the screenshots taken from the application