Giter Site home page Giter Site logo

dynamicapi's Introduction

Dynamic Api

Returns json data about a cars.

  • Installation:

You Will need Node JS and NPM to install project. 1.Run command npm i in the root folder of api project 2.App main file is src/server.js 3.Dependencies included in package.json file.

  • Endpoints

http://localhost:3000/api/cars/

http://localhost:3000/api/cars/[id]

{ "id": 2, "make": "Honda", "model": "Civic", "year": 2013, "createdAt": "2016-12-01T14:30:06.000Z", "updatedAt": "2016-12-01T15:13:47.000Z", "driveid": 1 }, { "id": 3, "make": "Nissan", "model": "Altima", "year": 2017, "createdAt": "2016-12-01T14:30:25.000Z", "updatedAt": "2016-12-01T14:30:25.000Z", "driveid": 1 } ]


Using GET  with endpoint http://localhost:3000/api/cars/3
would produce the result:

{ "id": 3, "make": "Nissan", "model": "Altima", "year": 2017, "createdAt": "2016-12-01T14:30:25.000Z", "updatedAt": "2016-12-01T14:30:25.000Z", "driveid": 1 }



`POST /http://localhost:3000/api/cars/`
`UPDATE /http://localhost:3000/api/cars/:id`
`DELETE /http://localhost:3000/api/cars/:id`



* **Sample Call:**

```javascript
 $.ajax({
   url: "http://domainname/api/cars/",
   dataType: "json",
   type : "GET",
   success : function(err) {
     console.log(r);
   }
 });

dynamicapi's People

Contributors

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