Skip to content

phongvq/scheduler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Night Watch scheduler

INSTALLATION

Requirements

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

Instructions

$ yarn install
$ yarn start # yarn dev for development

DOCUMENTATION

Environment Variables

  • MONGODB_URI (string): MongoDB URI
  • CRAWLER_ADDRESS (string): Address of crawler service

Routes

GET /

Just for testing

Response body
  • iam: "/"

GET /watch

Get all active watches

Response body

Array of objects:

  • id (string): ID of the watch
  • interval (positive integer): Number of seconds between executions
  • payload (object): Payload passed to the crawler

POST /watch

Add a new watch

Request body
  • interval (positive integer): Number of seconds between executions
  • payload (object): Payload passed to the crawler

GET /watch/:id

Get the active watch with id

Route parameters
  • id (string): ID of the watch
Response body
  • id (string): ID of the watch
  • interval (positive integer): Number of seconds between executions
  • payload (object): Payload passed to the crawler

DELETE /watch/:id

Delete/disable the active watch with id

Route parameters
  • id (string): ID of the watch

About

Night Watch scheduler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 95.7%
  • Dockerfile 4.3%