Review Request 110752: Bodega-server: Add documentation support to bodega-server. Also add markdown support

Antonis Tsiapaliokas kok3rs at gmail.com
Sun Jun 2 09:46:05 UTC 2013



> 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.

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...


- Antonis


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110752/#review33542
-----------------------------------------------------------


On May 31, 2013, 5:59 p.m., Antonis Tsiapaliokas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110752/
> -----------------------------------------------------------
> 
> (Updated May 31, 2013, 5:59 p.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 
> 
> Diff: http://git.reviewboard.kde.org/r/110752/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Antonis Tsiapaliokas
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/active/attachments/20130602/e7d02f33/attachment.html>


More information about the Active mailing list