Skip to content

Instantly share code, notes, and snippets.

@stwiname
Created February 19, 2017 22:49
Show Gist options
  • Save stwiname/812152e1b651e565cced811cfa21551a to your computer and use it in GitHub Desktop.
Save stwiname/812152e1b651e565cced811cfa21551a to your computer and use it in GitHub Desktop.

HTTP Queue

The aim is to write a simple http server with methods to use a queue.

Methods

These methods should be implemented:

  • POST /queue/pop - Should pop from the queue and return a JSON object with an ID and created time
  • POST /queue/push - Should submit JSON object to a server with an ID and push it to the queue
  • GET /queue/count Should return the size of the queue in a JSON object

Technologies

Please use these technologies:

Feel free to use any NodeJs libraries that you find suitable.

Bonus (not necessary)

Submission

Please tell us how long this took and submit either a link to a public git repo or a zip file with the project (excluding output files and the node_modules directory).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment