Giter Club home page Giter Club logo

node-js-practica's Introduction

Prácticas (NodeJs y MongoDB)

NodeJs Básico: hasta el commit f3ad78ace09dcc9201e212682d7aaaffb5def4cb [Status: Completada]

NodeJs Avanzado: Status[Incompleta]


Despliegue de apps en AWS

Nota para el profe: Puedes verificar en el archivo styles.css la cabecera 😁


Nodepop

API y website simple

Lo que necesitas:

Node.js MongoDB

Instalación de dependencias:

$ npm install

Revisa la conexión a la base de datos en /lib/connectMongoose.js (ver "Iniciar un servidor MongoDB en MacOS o Linux")

Incia un servidor MongoDB

./bin/mongod --dbpath ./data/

Copia .env.example a .env

cp .env.example .env

Configura con el nombre de tu bbdd

Inicia la BBDD:

# Este comando borra todo lo existente en la bbdd y te crea valores por defecto
$ npm run init-db.js

Start

En producción:

npm start

En debug:

npm run dev

Uso de la API

Obtener Anuncios

GET /api/anuncios

Crear Anuncios

POST /api/anuncios

Filtrar/Ordenar Anuncios:

  • Filtros por tag, nombre, venta, precio:

GET /api/anuncios?tags=mobile

GET /api/anuncios?nombre=Bicicleta

GET /api/anuncios?venta=true

GET /api/anuncios?precio=150

  • Orden de Anuncios (Ej: por precio, mayor a menor):

GET /api/anuncios?sort=-precio

node-js-practica's People

Contributors

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