Corrigir erro do Cors

This commit is contained in:
Joao Maria Araujo do Nascimento
2026-06-18 22:16:49 -03:00
parent 7301aea8f8
commit 6ebd25eba5
3 changed files with 14 additions and 17 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import cors from "cors";
// Inicialização do Express // Inicialização do Express
const app = express(); const app = express();
app.use(cors); app.use(cors());
// Rota de saúde, utilizada para testar se a API-REST está no ar // Rota de saúde, utilizada para testar se a API-REST está no ar
app.get("/health", (req, res) => { app.get("/health", (req, res) => {
+2 -3
View File
@@ -7,7 +7,6 @@
</head> </head>
<body> <body>
<div>
<table> <table>
<thead> <thead>
<th>Nome</th> <th>Nome</th>
@@ -18,8 +17,8 @@
</tbody> </tbody>
</table> </table>
</div>
<script src="app.js"></script>
<script src="js/app.js"></script>
</body> </body>
</html> </html>
+1 -3
View File
@@ -15,6 +15,4 @@ async function carregarUsuarios(){
}); });
} }
window.onload = () => { window.onload = carregarUsuarios;
carregarUsuarios();
};