Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-10 Thread dunkelheit via Digitalmars-d-learn
On Thursday, 1 February 2024 at 13:29:40 UTC, Rene Zwanenburg 
wrote:

On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote:
this is my code, I'm a begginer on vibe, and I want to use 
html and not diet files


Take a look at the static file example, I think that's close to 
what you're looking for.


https://github.com/vibe-d/vibe.d/blob/master/examples/http_static_server/source/app.d



gracias por la solucion aunque esperaba que fuera un poco mas 
simple el proceso pero estare estudiando el codigo y su 
funcionamiento


Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-10 Thread dunkelheit via Digitalmars-d-learn
On Friday, 2 February 2024 at 06:01:22 UTC, Menjanahary R. R. 
wrote:

On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote:

[...]


Explore this link 
https://github.com/D-Programming-GDC/gdcproject for potential 
sources of inspiration.



gracias por tu ayuda pero obtuve errores que nose solucionar :'(



Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-10 Thread dunkelheit via Digitalmars-d-learn

On Thursday, 1 February 2024 at 10:44:24 UTC, Aravinda VK wrote:

On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote:


!!! 5
html
body
h1 hello diet
-iframe("hola.html")


please help me :')


Try

```
html
body
h1 hello diet
iframe(src="hola.html")
```


gracias pero el resultado que obtuve fue que el mismo index.dt se 
me repetia en cascada y no me incluia en el iframe


Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-01 Thread Menjanahary R. R. via Digitalmars-d-learn

On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote:
this is my code, I'm a begginer on vibe, and I want to use html 
and not diet files


`import vibe.vibe;

void main()
{
auto settings = new HTTPServerSettings;
settings.port = 8080;
settings.bindAddresses = ["::1", "127.0.0.1"];
auto listener = listenHTTP(settings, );
scope (exit)
{
listener.stopListening();
}

logInfo("Please open http://127.0.0.1:8080/ in your browser.");
runApplication();
}

void hello(HTTPServerRequest req, HTTPServerResponse res)
{
res.render!"hola.dt";
}`

I tried to load my html through iframe but it not works

!!! 5
html
body
h1 hello diet
-iframe("hola.html")


please help me :')


Explore this link https://github.com/D-Programming-GDC/gdcproject 
for potential sources of inspiration.





Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-01 Thread Rene Zwanenburg via Digitalmars-d-learn

On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote:
this is my code, I'm a begginer on vibe, and I want to use html 
and not diet files


Take a look at the static file example, I think that's close to 
what you're looking for.


https://github.com/vibe-d/vibe.d/blob/master/examples/http_static_server/source/app.d


Re: how can I load html files and not .dt or diet files in vibe.d

2024-02-01 Thread Aravinda VK via Digitalmars-d-learn

On Thursday, 1 February 2024 at 03:20:31 UTC, dunkelheit wrote:


!!! 5
html
body
h1 hello diet
-iframe("hola.html")


please help me :')


Try

```
html
body
h1 hello diet
iframe(src="hola.html")
```


how can I load html files and not .dt or diet files in vibe.d

2024-01-31 Thread dunkelheit via Digitalmars-d-learn
this is my code, I'm a begginer on vibe, and I want to use html 
and not diet files


`import vibe.vibe;

void main()
{
auto settings = new HTTPServerSettings;
settings.port = 8080;
settings.bindAddresses = ["::1", "127.0.0.1"];
auto listener = listenHTTP(settings, );
scope (exit)
{
listener.stopListening();
}

logInfo("Please open http://127.0.0.1:8080/ in your browser.");
runApplication();
}

void hello(HTTPServerRequest req, HTTPServerResponse res)
{
res.render!"hola.dt";
}`

I tried to load my html through iframe but it not works

!!! 5
html
body
h1 hello diet
-iframe("hola.html")


please help me :')