Giter Club home page Giter Club logo

datasite-challenge's Introduction

Code Test

Test description & expectation

We have three endpoints

Your task is to implement a new service with a single endpoint that will return all the users, registered and unregistered, including the project ids the users belong to. If users do not belong to a project, project ids attribute would contain an empty array in the response payload.

The service can be implemented in any language/platform that you are most comfortable with. Having said that, we do have primary languages on our team so you would get mucho respect & bonus points if the solution is implemented in the following languages.

java
groovy
kotlin
node (es6+ | typescript)

The endpoint must use http protocol. The endpoint must return json by default.

Example of json payload to be returned from the new endpoint

[
  {
    "id": "1",
    "city": "Jaydashire",
    "company": "Goyette - Renner",
    "country": "South Africa",
    "firstName": "firstName 1",
    "lastName": "lastName 1",
    "organizationType": "organizationType 1",
    "phone": "524.276.1570 x487",
    "state": "SD",
    "zipCode": "68048",
    "disclaimerAccepted": false,
    "languageCode": "en",
    "emailAddress": "[email protected]",
    "projectIds": ["1","2"]
  },
  {  
    "id":"21",
    "emailAddress":"[email protected]",
    "languageCode":"en",
    "registrationId":"jwsMJNOk3oM3hVM5bGcF1",
    "registrationIdGeneratedTime":"156165026851",
    "projectIds": []
  }   
]

The solution must include tests

Once you have complete the solution, please do the following

  1. Fill in the Test solution
  2. Push it as a public repo on github.com.
  3. Send us the link to your repo and we will take a look. Thank you very much!

Test solution

Provide the instructions below. Please double check your instruction to make certain that it works.

Required components for running the application in development mode

Tell us what components we need to run your solution locally

Running

Node

Testing

Jest, Supertest

Install

Tell us what commands we have to run to install your solution dependencies locally

If only running for functionality, nothing If you are wanting to run npm run test, you will need to npm i and possibly npm i -g jest which will globally install jest for CLI use. You can read more about global installation here if you'd like to remove jest after installation.

Start the internal application in development mode

Tell us what commands/things we have to do to run your solution locally
Tell us what commands/things we have to do to execute the endpoint locally 

Ensure port 8080 is available then npm run start

If you have issues with 8080, try <PORT #> nodemon server/start.js, which will change the env variable and run on that port

To execute the endpoint: curl localhost:<PORT>/api/alldata

Optional but would really impress us

Build a dockerfile and include instructions how to build the image, start the container and execute the endpoint for that container locally

docker run -dp 8080:8080 jclasley/datasitechallenge

curl localhost:8080/api/alldata

Posted on dockerhub so you don't need to docker build!

Informational

Tell us anything else we should know

Thanks so much for the opportunity!

datasite-challenge's People

Contributors

jclasley avatar svc-github-saas-a avatar

Watchers

 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.