deleteman / vatican

Micro-framework designed to create REST APIs with minor effort
98 stars 6 forks source link

Relative absolute #34

Open smart--petea opened 10 years ago

smart--petea commented 10 years ago

23, #26, #31

I added a new param context in vatican app. All the paths in application will be computed relative to this param.

If context is setted, in constructor then it must be an absolute path and all the paths, which are not absolute will be computed relative to it.

If context is not setted then context will be considered current working directory.

For node version which do not support isAbsolute function I defined this function as component of path module.