A simple job queue built on AWS SQS and NodeJS using ES6/2015.
- NodeJs/ExpressJS
- MongoDB
- AWS SQS
$ npm i
QUEUE_URL=https://sqs.us-west-2.amazonaws.com/path/to/queue
ACCESS_KEY=[AWS AccessKey]
SECRET_KEY=[AWS SecretKey]
REGION=[AWS Region] e.g. 'us-west-2'
$ mongod
$ npm start
$ curl --data "url=https://www.example.com" http://localhost:8080/requests
{"__v":0,"url":"http://www.myspace.com","_id":"569ad80225b59d7b5c81b003","createdAt":"2016-01-16T23:53:22.563Z","completed":false}
$ curl http://localhost:8080/requests/:id
# If Job completed -
{"__v":0,"url":"http://www.example.com","_id":"1234","createdAt":"2016-01-16T23:53:22.563Z","completed":true, "htmlBody":"<html>...</html>"}
# Otherwise:
{"__v":0,"url":"http://www.example.com","_id":"12345","createdAt":"2016-01-16T23:53:22.563Z","completed":false}