Implement initial API structure with Docker support, CI/CD workflows, and authentication features
Despliegue Automático / desplegar (push) Failing after 1m29s
Despliegue Automático / desplegar (push) Failing after 1m29s
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
require('dotenv').config();
|
||||
const app = require('./src/app');
|
||||
const initDB = require('./src/initDB');
|
||||
|
||||
const puertoInterno = process.env.APP_PORT || process.env.PORT || 3000;
|
||||
|
||||
async function arrancarServidor() {
|
||||
// 1. Preparamos la base de datos
|
||||
await initDB();
|
||||
|
||||
// 2. Encendemos el servidor web
|
||||
app.listen(puertoInterno, '0.0.0.0', () => {
|
||||
console.log(`🚀 Servidor API escuchando en http://0.0.0.0:${puertoInterno}/api/status`);
|
||||
console.log(`🌐 Desde el móvil usa la IP del portátil: http://<IP_DEL_PORTATIL>:${puertoInterno}/api/status`);
|
||||
});
|
||||
}
|
||||
|
||||
arrancarServidor();
|
||||
Reference in New Issue
Block a user