Test exercise for Intercom
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Henry Jameson 8c40e4e322 small notice 6 년 전
lib improved logging and added bad input handling 6 년 전
.eslintrc.js Initial Commit 6 년 전
.gitignore Initial Commit 6 년 전
README.md small notice 6 년 전
index.js fix --home not working. found a known bug in 3rd party lib, so sad. 6 년 전
package-lock.json Initial Commit 6 년 전
package.json repo url 6 년 전

README.md

Notice

This tool by default uses OpenRouteMap API to fetch route distance between points with fallback to great-circle computation. It can be disabled with --no-orm option.

Dependencies:

  • NodeJS v10.6
  • NPM 6.1.0

Installation:

  1. cd into repository's directory
  2. npm install

Usage

execute ./index.js or node index.js. Usage is ./index.js --help

  Usage: index [options]

  Options:

    -V, --version            output the version number
    --customers [url]        URL for customers list. (default: https://s3.amazonaws.com/intercom-take-home-test/customers.txt)
    --home [home]            "Home" location - distances to customers will be calculated against it. Please prepend negative values with space, like so: --home " -1,2" (default: -6.257664, 53.339428)
    --no-orm                 Disables fetching distance via OpenRouteMap.
    --direct-routes          Fall back to simple calculation if ORM tells there are no routes.
    -d, --distance [meters]  Maximum exclusive distance in meters (default: 100000)
    -h, --help               output usage information