Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

feedhenry-templates/barcode-reader-service

Repository files navigation

Barcode Lookup

Dependency Status

This service looks up a barcode by UPC id. It connects with a SOAP service, takes a mixed SOAP and CSV response, and returns JSON back to the client, more effectively mobilising the service.

Requirements

The service will only work with node 4 and above. See package.json for more details.

Group Barcode API

Recent Searches [/barcode/recent]

'List recent searches' endpoint.

barcode/recent [GET]

'List recent searches' endpoint.

  • Response 200 (application/json)
    • Body [ "Array of recent barcode searches" ]

Read Barcode [/barcode/read]

'Read Barcode' endpoint.

barcode/read [POST]

'Read Barcode' endpoint.

  • Request (application/json)

    • Body { "barcode": "9780201896831" }
  • Response 200 (application/json)

    • Body [ "Some product data goes here" ]

Build

npm install

Tests

All the tests are in the "test/" directory. The cloud app is using mocha as the test runner.

  • run unit test:
npm test
  • run unit coverage:
npm run coverage