- mongodb
yarn install
- Create a database with a collection named
changelog
cp .env.example .env
and edityarn migrate
node index.js
POST /users/register HTTP/1.1
{
"name": "marco",
"pwd": "12345"
}
POST /users/login HTTP/1.1
{
"name": "marco",
"pwd": "12345"
}
Returns token
POST /services/register HTTP/1.1
{
"name": "service_1",
"pwd": "12345"
}
POST /services/login HTTP/1.1
{
"name": "service_1",
"pwd": "12345"
}
Returns token
- Put in the autorization the token received from the login service,
- Chage [USER_ID] with the user id of the user you want to send the notification
POST /push/[USER_ID] HTTP/1.1
Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{
"title": "test"
}