Code Monkey home page Code Monkey logo

node-exercise's Introduction

node-exercise

A little exercise using a Star Wars API https://swapi.co/

Goal

Make a small express server with endpoints centered around Star Wars. This will hopefully demonstrate to us abilities to make an express app, consume data from an API, and manipulate that data into some desired way

Requirements

  • Make an express server with at least the endpoints listed below
  • Use the API at https://swapi.co/ to get your Star Wars Data
  • When making paginated calls, limit the response to 10, so you can actually demonstrate using pagination to get all of the data

Endpoints

  • '/character/:name' - Returns an EJS view (nothing too fancy) with data about the given character. (Needs to work with at least 'luke', 'han', 'leia', and 'rey')
  • '/characters' - Returns raw JSON of 50 characters (doesn't matter which 50). This endpoint should be able to take a query parameter in the URL called 'sort' and the potential sort parameters will be 1 of the following, ['name', 'mass', 'height'] So the endpoint '/characters?sort=height' should return JSON of 50 characters sorted by their height.
  • '/planetresidents' - Return raw JSON in the form {planetName1: [characterName1, characterName2], planetName2: [characterName3]}. So it is an object where the keys are the planet names, and the values are lists of residents names for that planet

node-exercise's People

Contributors

joeycozza avatar

Watchers

 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.