Route serving template with AJAX request


lib/D2/Ajax.pm


get '/v1' => sub {
    return template 'v1';
};

Try v1