www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - serve - A simple HTTP server for static files

reply Martin Nowak <code+news.digitalmars dawg.eu> writes:
Sharing a useful tool of mine.

http://code.dlang.org/packages/serve
Mar 21 2015
parent reply "Suliman" <evermind live.ru> writes:
On Sunday, 22 March 2015 at 03:26:14 UTC, Martin Nowak wrote:
 Sharing a useful tool of mine.

 http://code.dlang.org/packages/serve
Could you explain why pure vibed do not good for static files?
Mar 22 2015
next sibling parent "Ozan =?UTF-8?B?U8O8ZWwi?= <ozan.sueel gmail.com> writes:
On Sunday, 22 March 2015 at 07:11:05 UTC, Suliman wrote:
 On Sunday, 22 March 2015 at 03:26:14 UTC, Martin Nowak wrote:
 Sharing a useful tool of mine.

 http://code.dlang.org/packages/serve
Could you explain why pure vibed do not good for static files?
When I get it right, * it's based on vibe.d * but has a different usage (simplifies handling of html-files/folders) (read http://code.dlang.org/packages/serve -> usage) I like. It's a great idea. Regards, Ozan
Mar 22 2015
prev sibling parent reply "Martin Nowak" <code dawg.eu> writes:
On Sunday, 22 March 2015 at 07:11:05 UTC, Suliman wrote:
 Could you explain why pure vibed do not good for static files?
It's mainly a replacement for `python -m SimpleHTTPServer`, and is just a very small tool around vibe.d's serveStaticFiles, which does a good job at serving static files and works much more reliable than the python variant. https://github.com/MartinNowak/serve/blob/master/source/app.d I also added index file serving to vibe.d recently. https://github.com/rejectedsoftware/vibe.d/pull/902
Mar 22 2015
next sibling parent "Brad Anderson" <eco gnuk.net> writes:
On Sunday, 22 March 2015 at 10:33:38 UTC, Martin Nowak wrote:
 On Sunday, 22 March 2015 at 07:11:05 UTC, Suliman wrote:
 Could you explain why pure vibed do not good for static files?
It's mainly a replacement for `python -m SimpleHTTPServer`, and is just a very small tool around vibe.d's serveStaticFiles, which does a good job at serving static files and works much more reliable than the python variant. https://github.com/MartinNowak/serve/blob/master/source/app.d I also added index file serving to vibe.d recently. https://github.com/rejectedsoftware/vibe.d/pull/902
Nice to have this. It always felt dirty using SimpleHTTPServer to test dlang.org locally.
Mar 22 2015
prev sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 3/22/2015 3:33 AM, Martin Nowak wrote:
 On Sunday, 22 March 2015 at 07:11:05 UTC, Suliman wrote:
 Could you explain why pure vibed do not good for static files?
It's mainly a replacement for `python -m SimpleHTTPServer`, and is just a very small tool around vibe.d's serveStaticFiles, which does a good job at serving static files and works much more reliable than the python variant. https://github.com/MartinNowak/serve/blob/master/source/app.d I also added index file serving to vibe.d recently. https://github.com/rejectedsoftware/vibe.d/pull/902
If you could write a brief article about it, that would be great! I think there's a lot of potential for D in that space, and having such articles will help promulgate the idea.
Mar 22 2015
parent Martin Nowak <code+news.digitalmars dawg.eu> writes:
On 03/22/2015 08:56 PM, Walter Bright wrote:
 
 If you could write a brief article about it, that would be great! I
 think there's a lot of potential for D in that space, and having such
 articles will help promulgate the idea.
An article would exceed the amount of code I wrote, but I did read up how to serve static files really fast, that might make for an interesting article.
Mar 23 2015