hapi is unable to start up when using foreman. It is unable to use the port that foreman starts up when accessed by process.env.PORT.
var server = new Hapi.Server(process.env.PORT);
Since this is the only way to deploy to heroku.com, this is important to get working.
Thanks. We'll look into it.
I created a sample hapi-heroku app to demonstrate how to use hapi on heroku.
The hapi server constructor expects that the port is a number. Therefore, you will need to convert the string process.env.PORT to a number. Also, if a host is not provided hapi will default to 'localhost', so you will need to specify a host. In hapi-heroku the constructor is (+process.env.PORT, '0.0.0.0')
Most helpful comment
I created a sample hapi-heroku app to demonstrate how to use hapi on heroku.
The hapi server constructor expects that the port is a number. Therefore, you will need to convert the string
process.env.PORTto a number. Also, if a host is not provided hapi will default to 'localhost', so you will need to specify a host. In hapi-heroku the constructor is(+process.env.PORT, '0.0.0.0')