From f23293971e16266c931bd62602bd8b202cda1c7b Mon Sep 17 00:00:00 2001 From: DiegoGDPR <106365170+diochos@users.noreply.github.com> Date: Mon, 24 Jun 2024 20:34:10 -0600 Subject: [PATCH] CORRECION en html de pre seguimiento --- index.js | 8 +++----- src/seguimiento-p-r-e.html | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 08caecf..222543b 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,10 @@ const express = require('express'); const app = express(); - -const port = process.env.PORT || 3000; - const mysql = require('mysql'); const path = require('path'); +const port = process.env.PORT || 3000; + const db = mysql.createConnection({ host: 'localhost', user: 'root', @@ -38,8 +37,7 @@ app.get("/seguimiento", (req, res) => { app.get("/empleadoTest", (req, res) => { res.sendFile(path.join(__dirname, 'src', 'empleadoTest.html')); }); -/* + app.listen(port, () => { console.log(`Servidor escuchando en http://localhost:${port}`); }); -*/ \ No newline at end of file diff --git a/src/seguimiento-p-r-e.html b/src/seguimiento-p-r-e.html index 62f71e6..7af5c1c 100644 --- a/src/seguimiento-p-r-e.html +++ b/src/seguimiento-p-r-e.html @@ -113,7 +113,7 @@ var aceptarButtContainer = document.getElementById("aceptarButtContainer"); if (aceptarButtContainer) { aceptarButtContainer.addEventListener("click", function (e) { - window.location.href = "./views/seguimiento.ejs"; + window.location.href = "/seguimiento"; // Ruta de Express }); }