nodepop-elchino v0.0.0
NodePop
Demo of the methods (this link works only if you run the project)
Api for the iOS/Android apps.
Deploy
Install dependencies
npm installConfigure
Review lib/connectMongoose.js to set database configuration
Init database
npm run initDBStart
To start a single instance:
npm startTo start in development mode:
npm run dev (including nodemon & debug log)To start Core Server:
npm run coteTest
npm test (pending to create, the client specified not to do now)ESLint
npm run hintsAPI v1 info
Base Path
The API can be used with the path: API V1
Error example
{
"error": {
"code": 401,
"message": "This is the error message."
}
}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:
{
"result": {
"rows": [
{
"_id": "55fd9abda8cd1d9a240c8230",
"nombre": "iPhone 3GS",
"venta": false,
"precio": 50,
"foto": "/images/anuncios/iphone.png",
"__v": 0,
"tags": [
"lifestyle",
"mobile"
]
}
],
"total": 1
}
}GET /anuncios/tags
Return the list of available tags for the resource anuncios.
Result:
{
"result": [
"work",
"lifestyle",
"motor",
"mobile"
]
}3 years ago