poeticninja / hapi-ninja

Boilerplate Hapi server example. Node.js, Hapi, and Swig.
MIT License
378 stars 56 forks source link

Trouble loading views on heroku #17

Closed danjessen closed 9 years ago

danjessen commented 9 years ago

As the title says, im having trouble making this setup work on heroku. Any ideas why it says it cant find index.html ?

poeticninja commented 9 years ago

I have not used Heroku with Node.js. Do you have this issue locally on your computer? Also, I know that Hapi 8.0.0 has some changes and I have not tested hapi-ninja with it. Besides that there should not be any issues.

Have you deployed to Heroku before with Node.js? I am not trying to be rude but think of ways to help you resolve this issue. https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction https://devcenter.heroku.com/articles/deploying-nodejs

I have deployed this to modulus.io and it worked no issues. Maybe there is something with Heroku that needs to be done.

If you still have issues I will setup a test Heroku account and make sure it is working.

danjessen commented 9 years ago

This is my first setup with node on heroku. It works fine locally. I just can't get it to load the views on heroku.

poeticninja commented 9 years ago

This worked fine for me. You can see it here. https://cryptic-scrubland-8582.herokuapp.com/

Did you setup a Procfile? I believe it is supposed to have the contents below in that file located in the root of your project. This is a Heroku thing. Maybe this will help?

web: node server.js

I just followed this tutorial https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction

danjessen commented 9 years ago

Okay. I'll have to look thru my code. I modelled it after your code. Execpt i moved the views config to a views.js file in the config folder.

danjessen commented 9 years ago

I still had issue running it before I moved it. But you confirmed that your code works. Sorry for taking up your time :)

poeticninja commented 9 years ago

Okay, I am going to close this issue but let me know if you still need any help!