vibe.d Subdirectory?

Laeeth Isharc via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 14 08:31:54 PST 2015


On Wednesday, 14 January 2015 at 11:40:26 UTC, seany wrote:
>
>
> I am new to vibe.d and plying a bit with it.
>
> I notice, that in case of Apache, there is a "root" directory, 
> often by default under /var/www or /srv/http (resp. ftp) if you 
> are using linux, and then every time the client sends a 
> request, apache looks in to the root directory, deduces the 
> subdirectory from the URI, and pulls the page up from there. 
> Then it parses the PHP / other scripting commands, and prints 
> the HTML as is, before serving it over http.
>
> I want to know the equivalent of all these in vibe.d. The 
> website has a documentation, but all what I find is that you 
> will need an app.d, in a predefined directory structure. I 
> however, do not understand, what the root directory is going to 
> be.
>
> Is it going to be the directry where vibe.d is started?
>
> Say, I start my vibe.d under /server, then I have an app.d 
> under /server/a/app.d and /server/b/app.d
>
> Do I access them via http://top.level.domain/a, resp /b, and 
> app.d is like index.html / index.php which vibe.d looks for by 
> default, or do i have to use http://top.level.domain/a/app.d

To be very clear: in the simple case when you compile your vibe 
application from multiple source files and diet templates etc, 
and you will end up with an executable.  This can act as a server 
directly, or you can make it an internal server on localhost 
called by php, or you can call it from nginx as a CGI type 
application depending on the URL.

The vibed directory layout is of no relevance after compilation 
(unless you put your static data there).



More information about the Digitalmars-d-learn mailing list