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, &hello);
        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.


Reply via email to