Public | Automated Build

Last pushed: 3 months ago
Short Description
test
Full Description

steps to run the application.

Prerrequisites :
Node.js, Mongodb, git, Postman, python

download the project from https://github.com/Kangan06/NodeThumbnail

  • run npm install

to start the application

  • start mongodb
  • run npm start

to run the test cases

  • run npm test

to generate code coverage
-run istanbul cover node_modules/mocha/bin/_mocha -- -R spec

  • to check code coverage goto "coverage\lcov-report\index.html"

APIs
-Use Postman to call the apis

GET

POST

  • http://localhost:8080/api/thumbnail ---> give public image url with https(no http) in body and set x-access-token in headers, the compresses image will be save in root directory
  • http://localhost:8080/api/apply ---> give the json and jsonPatch objects in body selecting raw with type application/json (eg. {
    "json":{"foo":"abc"},
    "jsonPatch":[{ "op": "replace", "path": "/foo", "value": "rabbit" }]
    })
    in response you will have both original and patched objects.
    GET
  • http://localhost:8080/api/users --->set x-access-token in headers and it will give you the list of all users
Docker Pull Command
Owner
kngn06
Source Repository

Comments (0)