0.0.7 • Published 8 years ago
api-notification v0.0.7

Installation process
To get started, you can simply clone this repository and install the dependencies:
Prerequisites
1. Git
You must have GIT to clone this repository:
sudo apt-get update
sudo apt-get install git2. Node.js and Npm
You must have node.js and its package manager (npm) installed.
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejsInstall dependencies
We get the tools we depend upon via npm. And install
npm installRun application
The simplest way to start this server is to use PM2 (Process Manager):
sudo npm install pm2 -gAfter install PM2:
npm run start-devNow browse to the app at http://localhost:2000.
Deployment in production
sudo npm startor
pm2 startOrRestart ecosystem.config.js
pm2 saveUsing
Send POST to:
http://<IP>:2000/notificationswith:
Headers:
Authorization: Basic YnVzY2E6d2Vsc2preQ==Body:
to:lourivaldo.vasconcelos@mangue3.com
site:www.buscaaero.com.br
description:Descricao do ocorrido
url:https://www.buscaaero.com.br/busca
type:error
title:Titulo do email###Description:
Header:
"Authorization" with base62 from user:email like "loro:sfddf"Body:
to: Email to send notification. Not required, if not passed email from authenticated user will be used
description: Description of notification. Required.
url: An URL from site where notification sent. Optional.
type: Type of notification like 'info', 'warning' or 'error'. Optional, default "info".
title: An title/subject to notification. Optional, default "Notification".