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

dunkelheit arcanet192 at gmail.com
Thu Feb 1 03:20:31 UTC 2024


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 :')


More information about the Digitalmars-d-learn mailing list