Adding Restaurants in Yelpdemo

I noticed that localhost:3000 often has a different amount of restaurants than the deployed Heroku app. I noticed it in Alex's videos and on my own computer. How do I add more restaurants so that they appear in the Yelp Heroku app, and not just localhost:3000. Does it require database changes or something else?

Posted about 5 years ago by TL
Posted about 5 years ago by Gemma Ward

Your localhost app uses a different database from the same app on Heroku. That's why you'll see that Alex shows different restaurants when he switches between the two. Remember that there are three code environments: development (localhost), production (Heroku), and testing (not covered in the Yelpdemo course). It's basically like having 3 separate (but nearly identical) apps.

To add more restaurants, you need to either add them manually, or add them via your db/seeds.rb file and then run 'rake db:seed' (or 'heroku run rake db:seed').

0
Posted about 5 years ago by TL

Thank you for the response. How do I add them manually, so that they will show up on Heroku?

0
Posted about 5 years ago by Alex Yang

By add them manually, I mean you should use your app's form interface to upload each restaurant.

0