nattaponaie / nimble-challenge

0 stars 0 forks source link

API setup instructions and failures #13

Closed olivierobert closed 5 years ago

olivierobert commented 5 years ago

While the README is quite complete, it lacks instructions on properly setting up the PostgreSQL database required for the API.

If one just builds the containers and run them with docker-compose up (this should be added to the README as well by the way) then this person would be greeted by this error:

browser-error

Which is caused by:

console-error

Therefore, either the README must mention that the database must be migrated with docker exec -ti toey_api_1 rake db:migrate or you need to edit the container command to migrate the database in development (let's never do that in production ☠️).

Also, note that one of the migration has a small typo which makes all migration fail:

toey___Volumes_Workspace__candidates-tests_toey__-_____docker-compose_yml

Caused by:

toey___Volumes_Workspace__candidates-tests_toey__-_____api_db_migrate_20190817070848_add_is_searched_to_keyword_rb

nattaponaie commented 5 years ago

Thank you for your suggestion.

According to latest pull request, I already fixed the issues you said above. This includes error handling when there is an error from API as well.

Moreover, I have added rake db:migrate command to docker-compose. Since the docker-compose will be used only in development so it's fine :)