Corrigir erro do Cors
This commit is contained in:
+1
-1
@@ -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) => {
|
||||||
|
|||||||
+11
-12
@@ -7,19 +7,18 @@
|
|||||||
</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>
|
||||||
@@ -15,6 +15,4 @@ async function carregarUsuarios(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = () => {
|
window.onload = carregarUsuarios;
|
||||||
carregarUsuarios();
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user