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

Aaron J. Seigo aseigo at kde.org
Fri May 31 23:01:34 UTC 2013


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


i don't think it makes much sense to include the README file, since that is required to get the server started. which makes it a bit of a chicken-and-egg problem ;) i also don't see much value in having the README available there. what might be more interesting is a license file in the docs.

also, this needs a test before it can go in. test should ensure that /api/ works, that requesting a non-existent file fails and requesting and existing file returns the actual file contents (the test can load it from disk to compare)


server/routes.js
<http://git.reviewboard.kde.org/r/110752/#comment24794>

    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.



server/routes.js
<http://git.reviewboard.kde.org/r/110752/#comment24793>

    this should be an async read with the callback sending the file contents.
    
    also, if the file does not exist the 404 page should be sent.


- Aaron J. Seigo


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/20130531/2a7281a6/attachment-0001.html>


More information about the Active mailing list