Giter VIP home page Giter VIP logo

lyft-codesample-dmccoy's Introduction

Project Prompt

Write a small web application in one of the above languages (Python/Ruby/Javascript). The application only needs to do the following: Accept a POST request to the route “/test”, which accepts one argument “string_to_cut” Return a JSON object with the key “return_string” and a string containing every third letter from the original string

(e.g.) If you POST {"string_to_cut": "iamyourlyftdriver"}, it will return: {"return_string": "muydv"}.

Built With

Getting Started

Prerequisites

Make sure you have Node installed - Follow this Guide

Installation

*Be sure to not include $ at the start of each command

1.Make a new Directory - via the command line in Terminal enter:

  $ mkdir newfolder && ch /path/to/newfolder 
  1. Clone the repo
    $ git clone https://github.com/dmccoy1/crypto-parser.git
  2. Inside the cloned repo directory - Install NPM packages
    $ npm install
  3. Run App
    $ node app.js
    The app will console out:
    Listening on port 80
  4. Open a new Terminal Window while the app the is running. Enter:
  $ curl -X POST http://127.0.0.1:80/test --data '{"string_to_cut": "iamyourlyftdriver"}' -H 'Content-Type: application/json'

Output should be:

{"return_string": "muydv"}

lyft-codesample-dmccoy's People

Contributors

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