Olá Após a aula sobre o Método Dao, segundo vídeo da aula 3, aparece a seguinte mensagem após chamar http://localhost:3000/livros no console:
PS C:\NodeJS\CasaDoCodigo> npm start
> casadocodigo@1.0.0 start C:\NodeJS\CasaDoCodigo
> nodemon server.js --ignore *.marko.js
[nodemon] 1.18.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
Servidor rodando na porta 3000
Usuario:
{ id: 1,
nome_completo: 'Gabriel Leite',
email: 'gabriel@alura.com.br',
senha: '123' }
C:\NodeJS\CasaDoCodigo\node_modules\sqlite3\lib\trace.js:27
throw err;
^
ReferenceError: resp is not defined
at C:\NodeJS\CasaDoCodigo\scr\app\rotas\rotas.js:13:13
at Statement._db.all (C:\NodeJS\CasaDoCodigo\scr\app\infra\livro-dao.js:11:17)
--> in Database#all('SELECT * FROM livros', [Function])
at LivroDao.lista (C:\NodeJS\CasaDoCodigo\scr\app\infra\livro-dao.js:8:18)
at C:\NodeJS\CasaDoCodigo\scr\app\rotas\rotas.js:11:18
at Layer.handle [as handle_request] (C:\NodeJS\CasaDoCodigo\node_modules\express\lib\router\layer.js:95:5)
at next (C:\NodeJS\CasaDoCodigo\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\NodeJS\CasaDoCodigo\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (C:\NodeJS\CasaDoCodigo\node_modules\express\lib\router\layer.js:95:5)
at C:\NodeJS\CasaDoCodigo\node_modules\express\lib\router\index.js:281:22
at Function.process_params (C:\NodeJS\CasaDoCodigo\node_modules\express\lib\router\index.js:335:12)
at next (C:\NodeJS\CasaDoCodigo\node_modules\express\lib\router\index.js:275:10)
[nodemon] app crashed - waiting for file changes before starting...