henriquecarv / netlolo-challenge

Netlolo developer challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Netlolo developer challenge

Netlolo

LICENSE Dependabot Status

User Story

A customer needs to search in a orderbook. He wants to buy offers below some price, and also sell offers to earn some money.

Returns json data about offers, based on one or more specific amounts. These results can also be sorted in ascending or descending order with an optional parameter.

System Requirements

Installing

  • npm install

Running Application

  • npm start

Running UnitTest

  • npm test

Examples

  • URL /offer/:amounts/:sort?

  • URL Params

    Required:

    amounts=[float]

    Optional:

    sort=[string]

    • Sample Calls:
  $.ajax({
    url: "/offer/80000/desc",
    dataType: "json",
    type : "GET",
    success : function(r) {
      console.log(r);
    }
  });

http://localhost:3000/offer/80000/desc

  $.ajax({
    url: "/offer/30000,20000/asc",
    dataType: "json",
    type : "GET",
    success : function(r) {
      console.log(r);
    }
  });

http://localhost:3000/offer/30000,20000/asc

About

Netlolo developer challenge

License:MIT License


Languages

Language:JavaScript 100.0%