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) { ...@@ -69,18 +69,24 @@ app.post ('/send', async function (req, res) {
data: { data: {
foo: 'bar' foo: 'bar'
}, },
priority: 'High', priority: 'High'
to: 'DEVICE_TOKEN'
} }
} }
const repsuesta = await axios(init); const repsuesta = await axios(init);
mensajeExito(res, repsuesta.data); mensajeExito(res, repsuesta.data);
} catch (error) { } catch (error) {
console.log('___________________________________________________________________________________________________'); if (error.response) {
console.log(error); console.log('____________________________________________________________________________________________________ERROR_RESPONSE_');
console.log('¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯'); 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); mensajeError(res, error.message);
} }
}
}) })
app.listen(5000, function () { 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