Git Product home page Git Product logo

full-stack-coderhouse-c43395's Introduction

full-stack-coderhouse-c43395


API railway.app en full-stack-coderhouse-c43395


configuracion del proyecto

INSTALACION DEPENDENCIAS

  1. hay que estar en path raiz de la carpeta full-stack-coderhouse-c43395/
  2. realizamos la instalacion de la dependencias
npm i

  1. para la ejecucion se utiliza nodemon nodemon.io

CONFIGURACION ENTORNO

  1. configurar archivo /src/config/.env.development con los siguiente valores

cada scope cuenta con su propio archivo de configuración

  • production
  • development
  • qa
PORT = {{PORT}}
MONGO_URL = {{MONGO_URL}}
ADMIN_NAME = {{AdminName}}
ADMIN_PASSWORD = {{AdminPassword}}


MONGO_URL={{MONGO_URL}}
PORT={{PORT}}
SECRET_PHRASE={{PASSWORD_PHRASE}}

GH_APP_ID=xx
GH_CLIENT_ID={{ID_GH}}
GH_CLIENT_SECRET={{SECRET_GH}}
GH_CALLBACK_UL={{URL_CALLBACK_GH}}

DOMAIN_URL={{DOMAIN_URL}}

GMAIL_ACCOUNT={{GMAIL_ACCOUNT}}
GMAIL_APP_PASSWD={{GMAIL_APP_PASSWD}}
GMAIL_SERVICE={{gmail}}

BASE DE DATOS

  1. el proyecto utiliza mongo como fuente de datos debe haber disponible algun servicio

Podemos utilziar mongo atlas https://www.mongodb.com/ servicio cloud de mongo o bien realizar una instalacion y configuracion local


INICIAR APP DEVELOPMENT

estando en el root del proyecto debemos ejecutar el siguiente comando npm run dev

    full-stack-coderhouse-c43395/package.json
    
    
    "scripts": {
    "test": "npx mocha ./test/supertest.test.js",
    "start": "node src/app.js",
    "dev": "nodemon src/app.js"
    },

ACCESO APP LOCAL

  1. accedemos a la api localhost

Captura de pantalla 2023-07-20 235707.png


IMPORTANTE:

Dentro de la esturctura del proyecto esta collection_postman path: full-stack-coderhouse-c43395/collection_postman/e-comerce-coder.postman_collection.json


ESTRUCTURA DEL PROYECTO

/full-stack-coderhouse-c43395/
├───collection_postman
│   └───capturas
├───src
│   ├───common
│   │   └───utils
│   ├───config
│   │   └───services
│   ├───controllers
│   ├───docs
│   │   ├───carts
│   │   └───products
│   ├───event_logs
│   ├───public
│   │   ├───css
│   │   ├───js
│   │   └───thumbnails
│   │       └───PRODUCTOS
│   ├───routes
│   │   └───utils
│   ├───services
│   │   ├───dao
│   │   │   ├───filesystem
│   │   │   │   ├───db
│   │   │   │   └───models
│   │   │   └───mongo
│   │   │       ├───managers
│   │   │       └───models
│   │   ├───dto
│   │   ├───email
│   │   ├───errors
│   │   │   ├───messages
│   │   │   └───middlewares
│   │   └───mocking
│   └───views
│       └───layouts
└───test
    └───images


TESTING:

para poder hacer los test debemos ejecutar el supertest dentro del modulo de test, hay que tener en cuenta que la app debe estar funcioando.

 npx mocha .\test\supertest.test.js

prueba_testing.png

Producto dado de alta y luego eliminado

captura_alta_producto.png

full-stack-coderhouse-c43395's People

Contributors

dacerb avatar

Watchers

 avatar

Forkers

gonzalito87

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.