Thread overview
serve - A simple HTTP server for static files
Mar 22, 2015
Martin Nowak
Mar 22, 2015
Suliman
Mar 22, 2015
Ozan Süel
Mar 22, 2015
Martin Nowak
Mar 22, 2015
Brad Anderson
Mar 22, 2015
Walter Bright
Mar 23, 2015
Martin Nowak
March 22, 2015
Sharing a useful tool of mine.

http://code.dlang.org/packages/serve
March 22, 2015
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?
March 22, 2015
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
March 22, 2015
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
March 22, 2015
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.
March 22, 2015
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.
March 23, 2015
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.