This api works perfectly in case of localhost. Even in live server reading of data from database is working fine. I deployed this in heroku. Here this api using Heroku Postg