Skip to content
Night Watch notification service
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.eslintrc.json
.gitignore
.prettierrc.json
LICENSE
README.md
package.json

README.md

Night Watch notification service

INSTALLATION

Requirements

  • Node.js >= 8
  • Dotenv files: .env.production and/or .env.development

Instructions

$ yarn install
$ yarn start # yarn dev for development

DOCUMENTATION

Environment Variables

  • NODE_ENV (string): "development" or "production" environment
  • PORT (number): Port number to run the server
  • FB_PAGE_ACCESS_TOKEN (string): Token to access Facebook page
  • FB_VERIFY_TOKEN (string): Token to connect notificaion service to Facebook webhook
  • RECIPIENT_ID (string): Testing Facebook account ID (temporary)

Routes

GET /

Just for testing

Response body
  • iam: "/"

GET /messenger/webhook

Facebook webhook to authenticate the notification service

POST /messenger/webhook

Get the Facebook user ID

POST /notifications/changes

Notify users of changes

Request body
  • url (string): URL
  • changes (object): Changes since the last crawl
    • [cssSelector] (any[]): Array of 2, the old value as the 1st element and the new one as the last element
You can’t perform that action at this time.