pmlopes / yoke

Yoke is a middleware framework for Vert.x
http://pmlopes.github.io/yoke/
Apache License 2.0
157 stars 44 forks source link

Where should 'views' live #152

Closed stuplum closed 9 years ago

stuplum commented 9 years ago

I'm currently working with an example template that didn't use Yoke, I think I am close to adding Yoke but I keep getting a 500 internal server error when I hit a route. I think its due to not being able to locate the view to be displayed.

The directory structure (simplified) is as follows

root
|
+ -- src
 |  + -- main
 |  |  + -- resources
 |  |  |  + -- web // this directory is from the existing skelton example
 |  |  |  |  -- index.html
 |  |  |  + -- views // this is a new directory I have added
 |  |  |  |  -- index.ejs
 |  |  |  -- server.js
 |  |  |  -- mod.json

The route code resides within server.js and is as follows:

router.get('/test', function (req) {
    req.response.render('views/index.ejs');
});

Does this look correct?

stuplum commented 9 years ago

It turns out that my view itself was throwing an error when being parsed through the templating engine