GithubHelp home page GithubHelp logo

heyday's Introduction

Using a programming language of your choice, write a resource endpoint that receives a userId as query string parameter and that returns that user’s email address and profile picture uri, both information available from 2 different external services

write a function that reads and combines values of two server calls before continuing execution.

DEV NOTES:

  • Run npm install
  • Run npm start to start server at 3434

I attempted to answer both questions on one repository. The first one is answered in the route /people. I'm taking advantage of express's middleware pattern to take the id, check if it is valid (sorry - really very rudimentory check - I could potentially have finished the database section and had a user table with credentials and perhaps done something more elaborate with sessions etc - I ran out of time and just wanted to submit it by Friday). I also wanted to set up a more elaborate error handler with a log property for logging error on the console for the dev and another property more suited/tailored for error to return to client.

I assume the second question wants to see how I handle asynchronicity. For both api calls I'm resolving the promises at the same time with Promise.all() to reduce load on server and get response faster too.

Additionally, you would need to use two APIs, one from faker cloud, and one from randomuser.me/api. I implemented best practices and put them in my .env. I'll the api info for you to test in the doc. Please let me know if things don't work in the links.

I thought I'd do these last but these ended up being hurried. I look forward to your feedback.

heyday's People

Contributors

amustafiz 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.