Giter Club home page Giter Club logo

08-rest's Introduction

Build Status

08-rest

Travis: https://travis-ci.com/khuynh92/08-rest
Heroku: https://khoa-08-rest.herokuapp.com
PR: #1

in order to run this app:

  1. clone this repository

  2. in your root folder, create a .env file and set PORT to your desired port. example: PORT = 3000

  3. in your terminal, locate where you cloned this repository, and then type the command:
    npm start

  4. in your broswer go to
    http://localhost:<YOURPORTHERE>

  5. Here, you can test different RESTful routes to ensure GET requests are working for /api/v1/pizza
    http://localhost::<YOURPORTHERE>/api/v1/pizza?id=hello world!

  6. To test POST, use your choice of of tools that makes requests to servers (httpie, postman). Make sure to send an object body, or a 400 error will appear. POST requests will only work on api/v1/pizza.

  7. To test POST, use your choice of of tools that makes requests to servers (httpie, postman). Make sure to send an object body, or a 400 error will appear. If no id query is passed, a 404 error will appear. POST requests will only work on pathnames with id queries api/v1/pizza/?id=youridhere.

  8. To test DELETE, use your choice of of tools that makes requests to servers (httpie, postman). If no id query is passed, a 404 error will appear. DELETE requests will only work on pathnames with id queries: api/v1/pizza/?id=youridhere.

08-rest's People

Contributors

jb-tellez avatar khuynh92 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.