Found a way to do what I want...do a get on router.get('*',...then parse 
req.url.

On Sunday, June 7, 2015 at 10:08:32 PM UTC-3, Grant MacDonald wrote:
>
> Hi folks.  I have a requirement that when the user enters the route and a 
> file name (ie. http://website/filename.pdf) that my node.js server will 
> determine which path (out of many) where the file exists (ie. rather than 
> generating a 404.)  The location of the file will be determined by the name 
> of the file passed in the URL.  I'm not sure the best way to do this (I am 
> using Express 4.)  Should I do the file location check when I catch the 404?
>
> Thanks. Grant.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/cbc76cc0-2c8c-4936-bec2-1f96b1d12f8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to