Skip to content

Latest commit

 

History

History
100 lines (78 loc) · 2.62 KB

README.md

File metadata and controls

100 lines (78 loc) · 2.62 KB

Restaurant Aggregator Application

https://github.com/Hooning/restaurant-aggregator-app.git

This is a restaurant aggregator project using the following technologies:

Requirements

npm module package setup

  1. Install npm from home directory of the project
npm install

This will install all the modules stated in local package.json file.
( It may take some time to install. )

  1. Check node_modules folder in home directory if the modules are succesfully installed.

Database setup (MongoDB)

Make sure to set config.js file in the config folder. See the example there for more details.

Basically, Set the databse configuration to
db_dev: 'mongodb://localhost:27017/restaurant_aggregator'

DB : restaurant_aggregator
Collections : restaurants, dishes

[Important] You must have restaurant datas inserted before crawling dishes.

Please insert restaurant data manually in Mongo shell :

    
db.restaurants.insertOne({
  "name": "Maccheroni Republic",
  "address":{
    "street": "332 S. Broadway",
    "city": "Los Angeles",
    "state": "CA",
    "zip": 90013
  },
  "telephoneNumber": "+1 (213) 346 9725",
  "url": "http://www.maccheronirepublic.com/menu.html",
  "img": "maccheroni.png",
  "lastUpdateDate": null
});

db.restaurants.insertOne({
  "name": "Pizzeria Il Fico",
  "address":{
    "street": "310 S. Robertson Blvd.",
    "city": "Los Angeles",
    "state": "CA",
    "zip": 90048
  },
  "telephoneNumber": "+1 (310) 271 3426",
  "url": "http://www.pizzeriailfico.com/menu",
  "img": "pizzeria.png",
  "lastUpdateDate": null
});

db.restaurants.insertOne({
  "name": "Cheebo",
  "address":{
    "street": "7533 Sunset Blvd",
    "city": "Los Angeles",
    "state": "CA",
    "zip": 90046
  },
  "telephoneNumber": "+1 (323) 850 7070",
  "url": "https://docs.wixstatic.com/ugd/4875de_caecf0487c5143e09a57202d2b4376ec.pdf",
  "img": "cheebo.png",
  "lastUpdateDate": null
});
    

Running server

  • Production mode:
npm start
  • Development (Webpack dev server) mode:
npm run start:dev