Hello guys. I am testing en NODE and  module REQUEST when i try by 
http://localhost:3000/ everything work, but when i doing deploy i have 
error. 


An error occurred in the application and your page could not be served. 
Please try again in a few moments.

If you are the application owner, check your logs for details.



In my View log: 


2016-02-02T09:17:55.169716+00:00 app[web.1]: npm ERR! missing script: start

2016-02-02T09:17:55.169939+00:00 app[web.1]: npm ERR! 

2016-02-02T09:17:55.170296+00:00 app[web.1]: npm ERR!     
<https://github.com/npm/npm/issues>

2016-02-02T09:17:55.170115+00:00 app[web.1]: npm ERR! If you need help, you may 
report this error at:

2016-02-02T09:17:55.165362+00:00 app[web.1]: npm ERR! Linux 3.13.0-71-generic

2016-02-02T09:17:55.177287+00:00 app[web.1]: 2016-02-02T09:17:55.177287+00:00 
app[web.1]: 

2016-02-02T09:17:55.807374+00:00 heroku[web.1]: Process exited with status 1

2016-02-02T09:17:55.817113+00:00 heroku[web.1]: State changed from starting to 
crashed


this is my code:

var express = require('express');
var request = require('request');
var app = express();
var PORT =  process.env.PORT || 3000;

var url_api = 'http://ipinfo.io';

app.get('/', function (req, res) { 
    request(url_api, function (error, response, body) {
          if (!error && response.statusCode == 200) {
               res.json(body);
               
          }
    });
});

app.listen(PORT, function () { 
    console.log('Server running on port ' + PORT);
});

Thanks !! 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to