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) => {
+12 -13
View File
@@ -6,20 +6,19 @@
<title>Document</title> <title>Document</title>
</head> </head>
<body> <body>
<div> <table>
<table> <thead>
<thead> <th>Nome</th>
<th>Nome</th> <th>E-mail</th>
<th>E-mail</th> <th>Perfil</th>
<th>Perfil</th> </thead>
</thead> <tbody id="conteudo_tabela_usuarios">
<tbody id="conteudo_tabela_usuarios">
</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();
};