Renderizzare una vista senza scrivere un handler
Quando una route non ha un handler, Total.js renderizza una vista per essa: views/about.html per /about/ e views/index.html per /. Puoi anche dare tu il nome alla vista passando una stringa invece di una funzione.
<!DOCTYPE html><html><body>@{body}</body></html><h1>Home</h1><h1>About us</h1><h1>Contact</h1>exports.install = function() {
ROUTE('GET /');
ROUTE('GET /about/');
ROUTE('GET /contact/', 'contact-page');
};