Commit 35b6de32 authored by Ivan Tancara's avatar Ivan Tancara
Browse files

quitando parametro

parent c38409a8
BACKEND
Instalar las dependencias:
con npm i
Ejecutar el backend con:
npm run start
La aplicacion estara escuchando en el puerto 5000
......@@ -69,18 +69,24 @@ app.post ('/send', async function (req, res) {
data: {
foo: 'bar'
},
priority: 'High',
to: 'DEVICE_TOKEN'
priority: 'High'
}
}
const repsuesta = await axios(init);
mensajeExito(res, repsuesta.data);
} catch (error) {
console.log('___________________________________________________________________________________________________');
console.log(error);
console.log('¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯');
if (error.response) {
console.log('____________________________________________________________________________________________________ERROR_RESPONSE_');
console.log(error.response.data);
console.log('¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯_ERROR_RESPONSE_');
mensajeError(res, error.response.data);
} else {
console.log('___________________________________________________________________________________________________ERROR_MESSAGE_');
console.log(error.message);
console.log('¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ERROR_MESSAGE_');
mensajeError(res, error.message);
}
}
})
app.listen(5000, function () {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment