Coder Social home page Coder Social logo

kc-practica-nodejs's Introduction

Módulo KC NodeJS

Repositorio usado para realizar la práctica del tercer módulo del bootcamp -> NodeJS

nodepop

  • MondoDB: To start a local server execute mongod --dbpath='/home/grusite/data/db'
  • To init the DB execute npm run installDB
  • To start the server execute npm run dev
  • To execute linter in all files npm run linter
  • To start the server with the DB formated and the linter npm run initDB-dev
  • models -> where I store the DB model
  • controllers -> where I store the route controllers
  • lib -> where I store somo db functions
  • public -> all necesary to interact with frontal made by EJS

API Methods

advertisement list

http://localhost:3000/apiv1/anuncios

Parameters:

With no parameters, it will return all advertisement aditionally, you can add any filter in the URL:

start: numeric. Skip the number given in the result returned limit: numeric. Limits the number of results returned fields: string. Selects the fields especified in the query sort: string. Sorts the query by the criteria given in the query name: string. Returns the ads that starts with the name given tag: string. Returns the ads with the tags given solg: string. Returns the ads if it for sold or to buy price: string. Returns the ads with the filter given in price

advertisement by id

http://localhost:3000/apiv1/anuncios/:id

create an ad

http://localhost:3000/apiv1/anuncios/

data { name: "name", sold: true|false, price: number, picture: path, tags: tags }

update an ad

http://localhost:3000/apiv1/anuncios/:id

dataToUpdate { name: "name", sold: true|false, price: number, picture: path, tags: tags }

delete an advertisement by id

http://localhost:3000/apiv1/anuncios/:id

tags available

http://localhost:3000/apiv1/anuncios/tags

kc-practica-nodejs's People

Contributors

grusite avatar

Watchers

James Cloos 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.