I'm trying to put my webapp online using heroku.
Everything gone fine, until I do some GET/POST method request. Then it returns a 500 or 503 error.
When I do it locally, it works. But when I send the request in heroku, it doesn't.
[OBS.: I'm trying to do the request with postman too... Same error!]
Is it some kind of permission, maybe? Cross-domain request?
I don't know about it very much...
2015-07-23T18:58:33.476410+00:00 app[web.1]: 10.123.198.169 - - [23/Jul/2015:18:57:48 +0000] "GET /backend/public/index.php/api/excel HTTP/1.1" 200 146079 "http://heinz.herokuapp.com/public/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36
2015-07-23T19:00:35.115264+00:00 heroku[router]: at=info method=GET path="/backend/public/index.php/api/txt" host=heinz.herokuapp.com request_id=334dfd15-e371-4e2b-a455-9feabd33fc42 fwd="200.9.124.34" dyno=web.1 connect=2ms service=51ms status=500 bytes=4784
2015-07-23T19:00:35.107136+00:00 app[web.1]: 10.69.166.135 - - [23/Jul/2015:19:00:35 +0000] "GET /backend/public/index.php/api/txt HTTP/1.1" 500 4519 "http://heinz.herokuapp.com/public/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36
2015-07-23T19:01:05.036183+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/backend/public/index.php/api/excel" host=heinz.herokuapp.com request_id=1963804e-6ed9-4dcb-9099-c91b1bfb3448 fwd="200.9.124.34" dyno=web.1 connect=3ms service=30001ms status=503 bytes=0
2015-07-23T19:01:15.770662+00:00 app[web.1]: 10.136.104.47 - - [23/Jul/2015:19:00:35 +0000] "GET /backend/public/index.php/api/excel HTTP/1.1" 200 146079 "http://heinz.herokuapp.com/public/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36
$scope.putTheThingsOnline = function() {
$http.get('../backend/public/index.php/api/excel').success(function() {});
$http.get('../backend/public/index.php/api/txt').success(function() {
return alert('Dados inseridos');
});
return alert('hello!');
};
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
[UPDATE]
I found the error, now I'm trying to get the solution. Here the real problem!
Looks like the problem is in the code, but I'm trying to solve it for a long time and nothing...