problem solved with ".static" :D thanks a lot On Tuesday, 13 November 2012 11:48:55 UTC-5, Nathan Rajlich wrote: > > Seeing as though you're literally just serving regular files here, you > should really just use the .static() middleware. See: > > https://github.com/visionmedia/express/blob/master/examples/static-files/index.js > > > On Tue, Nov 13, 2012 at 2:00 AM, Yash Girdhar > <[email protected]<javascript:>> > wrote: > > > > So, how can I serve the video in the same way as I am serving the file, > i.e. > > defining a route for that. > > right now, I am just giving the path of the video in the src attribute > of > > video tag > > On Tuesday, 13 November 2012 05:27:00 UTC+5:30, ryandesign wrote: > >> > >> > >> On Nov 12, 2012, at 16:32, Nathan Rajlich <[email protected]> > wrote: > >> > >> > Are you implementing the static file serving yourself? > >> > >> The only route defined in app.js is: > >> > >> app.get('/', function (req, res) { > >> res.sendfile(__dirname + '/index.html'); > >> }); > >> > >> Therefore "/" is the only route that will be served. If you also want > to > >> serve "/test.mp4", then you will need to define a route for that, or > hook up > >> some static middleware as Nate said. > >> > >> > > -- > > Job Board: http://jobs.nodejs.org/ > > Posting guidelines: > > 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 post to this group, send email to [email protected]<javascript:> > > To unsubscribe from this group, send email to > > [email protected] <javascript:> > > For more options, visit this group at > > http://groups.google.com/group/nodejs?hl=en?hl=en >
-- Job Board: http://jobs.nodejs.org/ Posting guidelines: 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 post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
