Code Monkey home page Code Monkey logo

code-challenge's Introduction

CP+R Code Challenge

The following is a short and simple code challenge showing a small cross-section of code you would find on the backend side of our production environement.

Installation

You should be familiar with the basic installation process but the short version is npm install and then npm run server to run begin.

Instructions

Please fork this repository and create a new branch. Open a PR and send a link to whichever developer sent you this challenge.

  • If you are not familiar with Heart Rate Zone training, please read this to familiarize yourself. We are not working with any complicated calculations, but a general understanding will be beneficial.

This simple application has two endpoints:

1.) GET /api/zones that will return a JSON object with details regarding the Heart Rate Zones

2.) POST /api/current_zone - takes current_hr and resting_hr in the body, which must be numbers, and returns the Heart Rate Zone applicable.

Your job is to fix a problem and implement two features:

  • Firstly, the code looks and feels quite solid. However, it doesn't seem to be accepting input data. Please ensure data can be sent to the POST endpoint.
  • Once we are receiving user input, the endpoint will return a string containing the relevant information. The zone, however, is not being calculated yet. Please complete the function in ./helpers/calculateZone.js to return the correct zone.
  • Excellent. Next is fairly open ended - we would like you to implement some simple testing to the application. It is up to you as to how much or little you implement. More is not necessarily better. If this was a feature you were implementing in the real world, you would need to balance time spent developing vs coverage. You may use any library or libraries you see fit.

We estimate that 2 hours should be adequate but please feel free to take less or more time as you feel necessary.

code-challenge's People

Contributors

bradtraversy avatar gregjarvez avatar gkennedy87 avatar ruairidhflint avatar

Watchers

James Cloos 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.