Giter VIP home page Giter VIP logo

nordsense-code-challenge's Introduction

Code challenge for Nordsense

Original challenge document can be found here.

Authored 2019-06-06 by Deividas Jackus.

Requirements

  • node version 10.0.0 or later.
  • npm version 6.0.0 or later.

Installation

npm i

Usage

Once run, the server will start on port 3000 unless specified otherwise using the environment variable PORT.

Running in development mode

Auto-reload is enabled by default using Nodemon.

npm run dev

Running in development with debugging enabled

Debugging is achieved using debug.

DEBUG=app npm run dev

Running in production

NODE_ENV=production npm start

API

The API exposed is a single endpoint.

Unless specified otherwise, all handlers return a HTTP status code of 2xx upon success and a 4xx error upon user input error.

Finds the intersection closest to the point provided along with angle & cardinal direction of the point in relation to the intersection.

Intersection data is loaded from intersections.csv (extracted from sheet originally provided as part of the challenge).

Response format:

{
  point: { // Input point
    latitude,
    longitude,
  },
  nearestIntersection: {
    id, // GISObjectID of the intersection
    name, // Name of the intersection
    latitude,
    longitude,
  },
  distance, // Distance in kilometers between the provided point & the intersection
  bearing, // Angle of the provided point in relation to the intersection
  direction, // Cardinal direction of the provided point in relation to the intersection
 }

nordsense-code-challenge's People

Contributors

deividasjackus avatar dependabot[bot] avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.