apascasio / nodepop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nodepop

API que dará servicio a una app de venta de artículos de segunda mano

##Instalando Dependencias

  • npm install

##Scripts

  • npm start: inicia servidor por el puerto 3000.
  • npm run dev: inicia en modo 'desarrollo' y por el 'puerto 3000'.
  • npm run installBD: inicializa Base de Datos, y carga datos

##Uso de API

##API v1 info GET /anuncios

Input Query:

start: {int} skip records limit: {int} limit to records sort: {string} field name to sort by includeTotal: {bool} whether to include the count of total records without filters tag: {string} tag name to filter venta: {bool} filter by venta or not precio: {range} filter by price range, examples 10-90, -90, 10- nombre: {string} filter names beginning with the string Input query example: ?start=0&limit=2&sort=precio&includeTotal=true&tag=mobile&venta=true&precio=-90&nombre=bi

Result: {

"ok": true,
"data": 

[

{

"_id": "562d2596fb97ce7b0a0a6e07",
"venta": false,
"precio": 10,
"foto": "http://localhost:3000/imagenes/anuncios/iphone4.jpg",
"__v": 0,
"tags": 

[
    "iphone",
    "iphone 4"
]

}, {

"_id": "562d25f4fb97ce7b0a0a6e08",
"venta": false,
"precio": 10,
"foto": "http://localhost:3000/imagenes/anuncios/iphone4.jpg",
"__v": 0,
"tags": 

        [
            "iphone",
            "iphone 4"
        ]
    }
]

}

##Ver API desplegada

About


Languages

Language:JavaScript 99.5%Language:CSS 0.5%