Poste some interesting vibe.d webpages

Alain De Vos devosalain at ymail.com
Thu Sep 22 07:51:02 UTC 2022


It's possible to remove the "@" annotation & use the default 
names of functions for the vibe framework,
E.g,
```
final class WebChat
{
     // GET /
     void get()
     {
         render!("index.dt", names);
     }

     void getEdit(string myid)
     {
         int id = myid.to!int;
         string firstname = names[id].firstname;
         string lastname = names[id].lastname;
         render!("edit.dt", id, firstname, lastname);
     }

     void postEdit(string myid, string firstname, string lastname)
     {
         int id = myid.to!int;
         names[id].firstname = firstname;
         names[id].lastname = lastname;
         render!("index.dt", names);
     }

```



More information about the Digitalmars-d-learn mailing list