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
const app = express();
app.use(cors);
app.use(cors());
// Rota de saúde, utilizada para testar se a API-REST está no ar
app.get("/health", (req, res) => {
+12 -13
View File
@@ -6,20 +6,19 @@
<title>Document</title>
</head>
<body>
<div>
<table>
<thead>
<th>Nome</th>
<th>E-mail</th>
<th>Perfil</th>
</thead>
<tbody id="conteudo_tabela_usuarios">
<table>
<thead>
<th>Nome</th>
<th>E-mail</th>
<th>Perfil</th>
</thead>
<tbody id="conteudo_tabela_usuarios">
</tbody>
</table>
</div>
</tbody>
</table>
<script src="app.js"></script>
<script src="js/app.js"></script>
</body>
</html>
+1 -3
View File
@@ -15,6 +15,4 @@ async function carregarUsuarios(){
});
}
window.onload = () => {
carregarUsuarios();
};
window.onload = carregarUsuarios;