CAROS , APOS ALTERAR O ROTAS.JS QUANDO TENTO NPM START DA ESSE ERRO :
casadocodigo@1.0.0 start C:\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
C:\casadocodigo\src\app\rotas\rotas.js:34
});
^
SyntaxError: Unexpected end of input at Module.compile (internal/modules/cjs/loader.js:721:23) at Object.Module.extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module.load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (C:\casadocodigo\src\config\custom-express.js:7:15) at Module.compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) [nodemon] app crashed - waiting for file changes before starting...
ALGUEM SABE O QUR PODE CAUSAR ? ABAIXO O MEU CODIGO DO ROTAS.JS
const db = require('../../config/database')
module.exports = (app) => {
app.get('/', function(req, resp) {
resp.send(
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<h1> Casa do Código </h1>
</body>
</html>
);
});
app.get('/livros', function(req, resp) {
db.all('SELECT * FROM livros', function(erro, resultados) {
resp.marko(
require('../views/livros/lista/lista.marko'),
{
livros: resultados
}
);
});
});
OK