Coder Social home page Coder Social logo

elecex-challenge-1's Introduction

Elecex Coding Challenge 1

Thank you for your interest in working at Electricity Exchange. Before we proceed with more formal interviews, we ask that all candidates submit a coding challenge. The coding challenge is a foundational piece of our process and it's referenced later in our process during the technical interviews.

If at any point you have questions concerning the coding challenge and/or interview process, please do not hesitate to email [email protected]

This challenge is intended to assess your coding ability in NodeJS.

We expect that this challenge should not take you longer than 2 hours, but you are free to take as long as you need.

Prerequisites

Available Commands

From the root directory there are a few commands that you can run

  • npm install - Install all dependencies.
  • npm start - Run the project.
  • npm run test - Run the unit and e2e test suites (in order to run the e2e test suite you will need to have the application running already).
  • npm run test:unit - Run the unit tests and prints coverage metrics.
  • npm run test:e2e - Runs the end to end tests (in order to run the test suite you will need to have the application running already).

Project Background

This project contains the beginnings of a simple REST api.

It consists of an SQLite database with two tables (Sites, Devices), and a simple webserver that currently exposes three RESTful endpoints.

You are expected to implement some new functionality, and ensure this new functionality is tested.

Requirements

  • Implement the endpoint that will make the tests defined in test/tests/sites.spec.js pass.
  • Add an endpoint to retrieve all active devices.
  • Update all new and existing endpoints to verify that parameters received are of the correct type & valid, adding any tests you feel are appropriate.

If you can think of any other changes that would improve the project, feel free to outline them in the improvements.txt file in this repo.

Assessment

Your submission will be reviewed on the following points:

  • Your ability to follow the requirements
  • Implementation of the requirements
  • Code readability and maintainability
  • Test quality and coverage

Project Overview

Application Codebase

  • src/index.js This file initialises the webserver and database and starts the server listening on localhost:3000
  • src/lib/Database.js This file is responsible for initialising the database & ensuring migrations are applied.

Testware

  • test/util/httpClient.js This file exposes a utility for making HTTP requests to the API when running your tests.
  • test/tests/*.spec.js These files contain the integration tests for the implemented REST endpoints.

Submission

To submit your coding challenge, commit all your changes to the master branch and run the following command:

git bundle create coding-challenge.bundle HEAD master

Visit the form located here to submit your coding-challenge.bundle file. We do our best to review and respond to submissions within 5 business days.

Thanks for taking the time to do this coding challenge and here's hoping we talk soon!

elecex-challenge-1's People

Contributors

aj-ee avatar jdrew1303 avatar

Watchers

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