IBM / FoodTrackerBackend

This tutorial teaches how to create a Kitura Swift backend for the FoodTracker iOS app tutorial from Apple. This project contains a version of the tutorial code that has been updated to use Codable rather than NSCoder.
108 stars 38 forks source link

Last step issue #25

Closed anm8tr closed 6 years ago

anm8tr commented 6 years ago

Hello, I completed the tutorial right up to the last step:

"Now when you perform a GET call to your server it will retrieve the meals from your database. You can verify this by going to http://localhost:8080/meals, where you should see your meals. You can now restart your server and this data will persist, since it is stored within the database!"

When I run it, I get the following returned:

[ { "name": "Pasta with Meatballs", "photo": "/9j/4AAQSkZJRgABAQAAkACQAAD/4QCARXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAACQAAAAAQAAAJAAAAABAAKgAgAEAAAAAQAABBGgAwAEAAAAAQAABDgAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/iAjRJQ0NfUFJPRklMRQABAQAAAiRhcHBsBAAAAG1udHJSR0IgWFlaIAfhAAcABwANABYAIGFjc3BBUFBMAA...

For some reason it is only pulling data from the "Pasta with Meatballs" entry

This is a small sample, it's actually quite a long file. I have no clue what happened, everything worked fine until I added the database. There are no errors when running FoodServer-Package in Xcode. I can add data to the FoodTracker app as well. It's just the return data that's out of whack.

Any feedback would be appreciated! I spent many hours getting this configured.

Regards,

Richard

anm8tr commented 6 years ago

All good now!

seabaylea commented 6 years ago

Thanks @anm8tr . Was the solution anything worth posting here for anyone else hitting a similar problem?

anm8tr commented 6 years ago

Hi Chris,

The long list of text I was seeing in my browser was actually the data from the photos. If I let the browser

just sit for 5 minutes it would eventually display all the data from the FoodDatabase in JSON format, which is

what I was supposed to be getting. No clue why it was so slow to display though.

Regards,

Richard


From: Chris Bailey notifications@github.com Sent: Monday, March 12, 2018 8:27 AM To: IBM/FoodTrackerBackend Cc: Richard Garrison; Mention Subject: Re: [IBM/FoodTrackerBackend] Last step issue (#25)

Thanks @anm8trhttps://github.com/anm8tr . Was the solution anything worth posting here for anyone else hitting a similar problem?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/IBM/FoodTrackerBackend/issues/25#issuecomment-372349912, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWFM_v-waJM4RGbVLt2VEhpfZ1PY-nwIks5tdpPFgaJpZM4SjJYm.