GithubHelp home page GithubHelp logo

http-single-resource's Introduction

http-single-resource: coded by [Drew Stock] (https://github.com/DrewStock)

================================================== This app launches a local HTTP server which is backed by a persistent data store. The server responds to GET, POST, PUT and DELETE requests to the resource '/tacos'. It's a taco store! ๐Ÿ˜œ

The following are command line instructions for using the app.

  • After cloning the repo:
    • type 'npm install'
  • To launch the app and run tests:
    • type 'npm start'
  • To launch the app:
    • type 'node index.js'
    • this creates a local HTTP server, which will be listening on port 5000
  • Overview of functionality:
    • GET request to '/tacos', where resources are stored - server writes response text, a list of resources in the directory
    • GET request for resource at '/tacos/pollo' - server writes response text, which is the contents of the resource
    • POST request for resource at '/tacos/pescado' - server writes response text and creates a new resource, whose contents are the parsed body of the request
    • PUT request for resource at 'tacos/pescado' - server writes response text and creates a new resource (if not already existing) or updates an existing resource. The updated contents of the resource are the parsed body of the request
    • DELETE request to 'tacos/pescado' - server writes response text and deletes resource

http-single-resource's People

Contributors

drewstock avatar martypdx 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.