> On May 31, 2013, 11:01 p.m., Aaron J. Seigo wrote: > > server/routes.js, line 366 > > <http://git.reviewboard.kde.org/r/110752/diff/1/?file=147519#file147519line366> > > > > this means we can't have subdirs in the doc/ directory. perhaps better > > would be to call path.normalize .. sth like: > > > > app.get('/api/(.*)', function(req, res) { > > var filename = path.normalize(req.params[0]); > > > > this allows subdirs, and protects against things like '..' causing > > problems. > > Antonis Tsiapaliokas wrote: > The above code makes a valid url something like > localhost:3000/api/.json_api.. Is that correct? > > In order the url to have the format localhost:3000/api/json_api it needs > something like > > app.get('/api/(*)', function(req,res) etc... > >
According to the Express documentation, it uses regular expressions so .* should work .. but whatever, as long as it works that's all that counts. If (*) works, go for it :) - Aaron J. ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/110752/#review33542 ----------------------------------------------------------- On June 2, 2013, 9:48 a.m., Antonis Tsiapaliokas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/110752/ > ----------------------------------------------------------- > > (Updated June 2, 2013, 9:48 a.m.) > > > Review request for Bodega. > > > Description > ------- > > Hello > > with that patch i am adding the following support to the bodega-server: > > 1) server/doc is the place which all of our documentaion lives. > 2) The docs are accessible from /api/filename.E.x. for docs/README.markdown > => api/README > > If you all agree with that patch, i will push it to the branch which i am > referring above(kokeroulis/markdown/documentation) > > P.S. the two files are from bodega-server and bodega-client > > > Diffs > ----- > > server/doc/index.markdown PRE-CREATION > server/doc/json_api.markdown PRE-CREATION > server/package.json 09f2527 > server/routes.js 95883a9 > server/test/api.js PRE-CREATION > server/test/support/http.js b9e5cb3 > > Diff: http://git.reviewboard.kde.org/r/110752/diff/ > > > Testing > ------- > > > Thanks, > > Antonis Tsiapaliokas > >
_______________________________________________ Active mailing list Active@kde.org https://mail.kde.org/mailman/listinfo/active