Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

Latest commit

 

History

History

queue

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Arquiyalt queue

Table Of Contents

Development

Clone the repo and cd to queue directory

yarn
yarn dev

Environment variables

variable default use
PORT 3002 port in which queue will listen for requests
API_URI localhost:3000 api base url, should depend on the machine the queue is deployed
API_QUEUE_SECRET apiqueuesecret secret key shared between api and queue
REDIS_PORT 6379 redis database port
REDIS_HOST localhost redis database host
REDIS_PASS redis database pass
ARQUITRAN_URI http://arqss16.ing.puc.cl arquitran api url
ARQUITRAN_TOKEN d51f6a66-e670-41c4-8187-2149bc46654e arquitran api token
ARQUITRAN_ID G1 arquitan api group id

API usage

Purchase

  • Route: POST /purchase

  • Headers:

    • Content-Type: application/json
    • Secret: env_variable_API_QUEUE_SECRET
  • Example Body:

    {
      "orders": [
        {
          "userId": "aUserId",
          "productId": "aProductId",
          "sentAt": "dateOfPurchase"
        },
      ]
    }
  • Success Response:

    • Status: 200

    • Content:

      { "message": "Created N tasks" }
  • Error Response (untested):

    • Code: 500

    • Content:

      { "message": "Error description" }
    • Code: 401

    • Content:

      { "message": "Unauthorized" }

Contributors: