GithubHelp home page GithubHelp logo

jibble's Introduction

Instructions

Build a nodejs server based on any Framework you like. It will act as an API server providing a set of CRUD endpoints as well as an aggregation one. You will use https://jsonplaceholder.typicode.com/ as a datasource and more specifically the following 3 resources.

/posts /users /albums

All endpoints must be behind an /api/ prefix/. The CRUD routes are only applicable to the posts resource while the aggregated one, which should be called /collection, is a simple GET method.

Every endpoint must be protected by an Auth layer and only reply 200 when the 'Authorization' header is present in every request. The value of the header should be a token of 'Bearer af24353tdsfw' and if it's missing or invalid the server response must be a 501. The /collection route is aggregating all 3 resources returning a collection of only 30 items each of which should contain random items from each resource, finally looking something like this "post" : {...},

"album" : {...}

"user" : {...}

},

...

]

We do not care about the extra items remaining from each resource. Finally, add a provision for caching and request throttling. Do not implement them, just provide a skeleton interface that if it where to be implemented these 2 features would work out of the box.

Some tips:

  • Use any nodejs framework you like or not, up to you
  • Provide instructions on how to install-run your server as well as how to test it
  • Focus on future-proofing your code

You get bonus points for:

  • Using Typescript or ES6
  • Using TDD
  • Providing good documentation

Installation

  1. Clone the repository
  2. Change the directory to Jibble
  3. Run npm install to install node dependencies.

Usage

Run npm start and then navigate to localhost:3000 to view the application

jibble's People

Contributors

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