ut v1
DevSecOps Enterprise Pipeline / security-gate-and-deploy (pull_request) Failing after 8s

This commit is contained in:
pm
2026-06-12 00:45:12 +01:00
parent 3967393895
commit cd5785c497
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -33,6 +33,7 @@ const transporter = nodemailer.createTransport({
}
});
// Endpoint do Formulário de Contacto (Com Recetor Dinâmico)
app.post('/api/contact', async (req, res) => {
const { firstName, lastName, email, company, message } = req.body;
@@ -84,11 +85,10 @@ app.post('/api/contact', async (req, res) => {
res.status(500).json({ error: 'Internal server error. Could not send confirmation email.' });
}
});
module.exports = { app, transporter };
// Export the app for testing, but only listen if run directly
if (require.main === module) {
app.listen(PORT, () => {
console.log(`[Apex Server] Running on port ${PORT}`);
});
}
module.exports = app;
+1 -1
View File
@@ -1,5 +1,5 @@
const request = require('supertest');
const app = require('../backend/server');// Adjust the path if server.js is in another folder
const { app, transporter } = require('../backend/server');
const nodemailer = require('nodemailer');
// ==========================================