Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
agetic
sitio-firebase
Commits
35b6de32
Commit
35b6de32
authored
Mar 17, 2020
by
Ivan Tancara
Browse files
quitando parametro
parent
c38409a8
Changes
3
Show whitespace changes
Inline
Side-by-side
INSTALL.md
0 → 100644
View file @
35b6de32
BACKEND
Instalar las dependencias:
con npm i
Ejecutar el backend con:
npm run start
La aplicacion estara escuchando en el puerto 5000
backend/README.md
deleted
100644 → 0
View file @
c38409a8
backend/server.js
View file @
35b6de32
...
...
@@ -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
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment