{"action":"closed","issue":{"url":"https://api.github.com/repos/trailsjs/trailpack-hapi/issues/32","repository_url":"https://api.github.com/repos/trailsjs/trailpack-hapi","labels_url":"https://api.github.com/repos/trailsjs/trailpack-hapi/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/trailsjs/trailpack-hapi/issues/32/comments","events_url":"https://api.github.com/repos/trailsjs/trailpack-hapi/issues/32/events","html_url":"https://github.com/trailsjs/trailpack-hapi/issues/32","id":127991287,"number":32,"title":"Proper way to set up views?","user":{"login":"thejones","id":682850,"avatar_url":"https://avatars.githubusercontent.com/u/682850?v=3","gravatar_id":"","url":"https://api.github.com/users/thejones","html_url":"https://github.com/thejones","followers_url":"https://api.github.com/users/thejones/followers","following_url":"https://api.github.com/users/thejones/following{/other_user}","gists_url":"https://api.github.com/users/thejones/gists{/gist_id}","starred_url":"https://api.github.com/users/thejones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejones/subscriptions","organizations_url":"https://api.github.com/users/thejones/orgs","repos_url":"https://api.github.com/users/thejones/repos","events_url":"https://api.github.com/users/thejones/events{/privacy}","received_events_url":"https://api.github.com/users/thejones/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/trailsjs/trailpack-hapi/labels/needs%20documentation","name":"needs documentation","color":"5319e7"},{"url":"https://api.github.com/repos/trailsjs/trailpack-hapi/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-21T18:35:57Z","updated_at":"2016-04-20T12:41:12Z","closed_at":"2016-04-20T12:41:12Z","body":"I added the info per the read me and set the engine in the views.js file and added inert and vision in web.js. \r\n\r\nInside web.js I also added \r\n```\r\nviews: {\r\n    engines: {\r\n      html: require('handlebars')\r\n    },\r\n    path: 'views'\r\n},\r\n\r\n```\r\nIn ViewController (default from yeoman) I changed the HelloWorld to: \r\n```\r\n  helloWorld (request, reply) {\r\n    reply.view('about');\r\n  }\r\n```\r\nI believe this is correct but could be wrong. I created the views folder and added about.html inside. This folder is directly under the project: \r\n\r\nproject\r\n-api\r\n-config\r\n-views\r\n-test\r\n-node_modules\r\n\r\nThis gives a 500 error and the console gives \r\n```\r\nerror: View file not found: `about.html`. Locations searched: [/Users/ajones/git/training/trails_testing/config../views/about.html]\r\n```\r\nSo it appears that it does not lookup the path correctly. \r\n\r\nI tried setting the path in various ways but same message. \r\n```\r\npath: '../views'\r\n```\r\nAs well as using relativeTo: http://hapijs.com/tutorials/views\r\n```\r\nrelativeTo: __dirname,\r\npath: 'views'\r\n```\r\n\r\nI am not sure what is missing but thought I would provide this as maybe somebody else will need the info as well. "}}