Não entendi de onde veio a variável 'lista', e estou tendo o seguinte erro:
TypeError: D:\trabalhos\alura\nodeJS\casadocodigo\app\views\produtos\lista.ejs:13
   11|             <td>preco</td>     
   12|         </tr> 
>> 13|         <%for(var i=0 ; i < lista.length ; i++) {%> 
   14|             <tr> 
   15|                 <td><%=lista[i].id%></td> 
   16|                 <td><%=lista[i].titulo%></td> 
Cannot read property 'length' of undefined
   at eval (eval at <anonymous> (D:\trabalhos\alura\nodeJS\casadocodigo\node_modules\ejs\lib\ejs.js:491:12), <anonymous>:11:30)
   at returnedFn (D:\trabalhos\alura\nodeJS\casadocodigo\node_modules\ejs\lib\ejs.js:520:17)
   at View.exports.renderFile [as engine] (D:\trabalhos\alura\nodeJS\casadocodigo\node_modules\ejs\lib\ejs.js:374:31)
   at View.render (D:\trabalhos\alura\nodeJS\casadocodigo\node_modules\express\lib\view.js:126:8)
   at tryRender (D:\trabalhos\alura\nodeJS\casadocodigo\node_modules\express\lib\application.js:639:10)
   at EventEmitter.render (D:\trabalhos\alura\nodeJS\casadocodigo\node_modules\express\lib\application.js:591:3)
   at ServerResponse.render (D:\trabalhos\alura\nodeJS\casadocodigo\node_modules\express\lib\response.js:960:7)
   at Query._callback (D:\trabalhos\alura\nodeJS\casadocodigo\app\routes\produtos.js:13:17)
   at Query.Sequence.end (D:\trabalhos\alura\nodeJS\casadocodigo\node_modules\mysql\lib\protocol\sequences\Sequence.js:85:24)
   at D:\trabalhos\alura\nodeJS\casadocodigo\node_modules\mysql\lib\protocol\Protocol.js:399:18Meu app.js e lista.ejs estão assim:
app.js
var app = require('./config/express')();
var rotasProdutos = require('./app/routes/produtos')(app);
app.listen(3000, function(){
    console.log("Servidor rodando");
});lista.ejs
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Lista de produtos</title>
    </head>
<body>
    <table>
        <tr>
            <td>id</td>    
            <td>titulo</td>    
            <td>descricao</td>    
            <td>preco</td>    
        </tr>
        <%for(var i=0 ; i < lista.length ; i++) {%>
            <tr>
                <td><%=lista[i].id%></td>
                <td><%=lista[i].titulo%></td>
                <td><%=lista[i].descricao%></td>
                <td><%=lista[i].preco%></td>
            </tr>
        <%}%>
        <tr>
        </tr>    
    </table>
</body>
</html> 
            