Open smart--petea opened 10 years ago
@smart--petea the method "isAbsolute" does not seem to be part of the "path" module: http://nodejs.org/api/path.html How is it working for you?
I'm working with experimental node with support for generators (version 0.11.*). But version 0.10.32 (the current stable version) support the isAbsolute
function.
@smart--petea please make sure you don't add code from experimental versions of Node on your PRs. Also, I don't see the support for isAbsolute method in version 0.10.32, and even it if was supported, it's not supported by version 0.10.22 (which is what I have) and I don't want to force people to update their node.js to the latest version in order for Vatican to actually work. So please, use a different method.
Thanks
You are right. I misunderstood their source code from version 0.10.32 - https://github.com/joyent/node/blob/v0.10.32-release/lib/path.js. There they use isAbsolute
in quality of simple variable.
In Vatican.requestHandler there is the snippet
If options.handlers is defined as relative path all it's ok. If options.handlers is defined as absolute paths the
methodFound.handlerPath
is an absolute path and the expressionprocess.cwd() + "/" + methodFound.handlerPath
will give something likeplus an error of reading the directory.
Maybe
path
moduleVatican.parseHandlers
Vatican.requestHandler