<file_sep>var mongoose = require('./database');

var FuneralHome = require('../models/funeralHome');

var funeralHomes = [
 {
   "name": "<NAME>",
   "street": "401 West Channel Islands Blvd. ",
   "city": "Oxnard",
   "county": "Ventura County ",
   "state": "California",
   "zip": 93033,
   "phone": "(805) 487-4911",
   "fax": "(805) 487-8970",
   "fd": "FD 1104",
   "basic_services_funeral_director": 1595,
   "embalming": 895,
   "dressing_casketing": 395,
   "bathing_handling": 150,
   "refrigeration": 895,
   "visitation": 395,
   "funeral_service": 195,
   "memorial_service": 195,
   "transfer_crematory": 125,
   "removal": 495,
   "hearse": 295,
   "service_vehicle": 195,
   "alternative_container": 145,
   "rental_casket": 1295,
   "basic_services_direct_cremation": 380,
   "crematory_fee": 275,
   "prayer_cards": 50,
   "register_book": 80,
   "urn": 295,
   "casket": 1195,
   "direct_cremation_total_cost": 2315,
   "traditional_cremation_total_cost": 5275,
   "traditional_burial_total_cost": 5785,
   "location_img_url": "http://i.imgur.com/ni1lGjB.png",
   "email": "<EMAIL>",
   "yelpId": "conrad-carroll-mortuary-oxnard"
 },
 {
   "name": "<NAME> ",
   "street": "629 South A St.",
   "city": "Oxnard",
   "county": "Ventura County ",
   "state": "California",
   "zip": 93030,
   "phone": "(805) 486-9148",
   "fax": "(805) 483-4439",
   "fd": "FD 1338",
   "basic_services_funeral_director": 997,
   "embalming": 647,
   "dressing_casketing": 197,
   "bathing_handling": 197,
   "refrigeration": 500,
   "visitation": 500,
   "funeral_service": 400,
   "memorial_service": null,
   "transfer_crematory": null,
   "removal": 397,
   "hearse": 395,
   "service_vehicle": 195,
   "alternative_container": 75,
   "rental_casket": 950,
   "basic_services_direct_cremation": null,
   "crematory_fee": null,
   "prayer_cards": 150,
   "register_book": 35,
   "urn": null,
   "casket": 950,
   "direct_cremation_total_cost": 1200,
   "traditional_cremation_total_cost": 3971.5,
   "traditional_burial_total_cost": 4863,
   "location_img_url": "http://i.imgur.com/1x5AwOp.png",
   "email": "<EMAIL>",
   "yelpId": "garcia-mortuary-oxnard"

 },
 {
   "name": "<NAME> ",
   "street": "511 North A St. ",
   "city": "Oxnard",
   "county": "Ventura County ",
   "state": "California",
   "zip": 93030,
   "phone": "(805) 487-1720",
   "fax": "NA",
   "fd": "FD 2069",
   "basic_services_funeral_director": 1095,
   "embalming": 650,
   "dressing_casketing": 195,
   "bathing_handling": null,
   "refrigeration": null,
   "visitation": 400,
   "funeral_service": 400,
   "memorial_service": null,
   "transfer_crematory": null,
   "removal": 390,
   "hearse": 385,
   "service_vehicle": null,
   "alternative_container": 60,
   "rental_casket": 995,
   "basic_services_direct_cremation": null,
   "crematory_fee": null,
   "prayer_cards": 95,
   "register_book": 40,
   "urn": null,
   "casket": 995,
   "direct_cremation_total_cost": 1200,
   "traditional_cremation_total_cost": 5455,
   "traditional_burial_total_cost": 4645,
   "location_img_url": "http://i.imgur.com/IwpDu3A.png",
   "email": "<EMAIL>",
   "yelpId": "reardon-funeral-home-oxnard-2"
 }
]

FuneralHome.remove({}, function(err) {
  if(err) console.log(err);
  FuneralHome.create(funeralHomes, function(err, savedFuneralHomes) {
    if (err) {
      console.log(err);
    } else {
      console.log("Database seeded with " + savedFuneralHomes.length + " funeral homes.");
      mongoose.connection.close();
    }
    process.exit();
  });
});
<file_sep>var mongoose = require('mongoose');

var funeralHomeSchema = new mongoose.Schema({
  name: String,
  street: String,
  city: String,
  county: String,
  state: String,
  zip: Number,
  phone: String,
  fax: String,
  fd: String,
  basic_services_funeral_director: Number,
  embalming: Number,
  dressing_casketing: Number,
  bathing_handling: Number,
  refrigeration: Number,
  visitation: Number,
  funeral_service: Number,
  memorial_service: Number,
  transfer_crematory: Number,
  removal: Number,
  hearse: Number,
  service_vehicle: Number,
  alternative_container: Number,
  rental_casket: Number,
  basic_services_direct_cremation: Number,
  crematory_fee: Number,
  prayer_cards: Number,
  register_book: Number,
  urn: Number,
  casket: Number,
  direct_cremation_total_cost: Number,
  traditional_cremation_total_cost: Number,
  traditional_burial_total_cost: Number,
  location_img_url: String,
  email: String,
  yelpId: String
});


var funeralHome = mongoose.model('funeralHome', funeralHomeSchema);

module.exports = funeralHome;
<file_sep>var express = require('express');
var router = express.Router();
var funeralHomesCtrl = require('../controllers/funeralHomes')

/* GET home page. */
// API Documentation Landing Page
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Marigold' });
});

// API Routes, respond with JSON only
router.route('/api/funeralHomes')
  .get(funeralHomesCtrl.index)
  .post(funeralHomesCtrl.create);

router.route('/api/funeralHomes/:id')
  .get(funeralHomesCtrl.show)
  .patch(funeralHomesCtrl.update)
  .delete(funeralHomesCtrl.destroy);

router.route('/api/email')
  .post(funeralHomesCtrl.sendEmail);

router.route('/api/yelp/:id')
  .get(funeralHomesCtrl.getYelp);

module.exports = router;
