Giter Site home page Giter Site logo

pet-app's Introduction

Pet app

Contenedor de la base de datos

Definimos el USER_NAME

Poner un nombre de usuario en una variable de entorno.

USER_NAME=andcastillo

Crear la imagen de docker con el esquema y los datos pre-guardados

cd database_postgres
docker build -t ${USER_NAME}/mande_db .

Poner a correr el servidor de bases de datos

docker run --name mande_db -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d ${USER_NAME}/mande_db

Contenedor para el backend

Instalar las dependencias

Debes estar en la carpeta raìz del proyecto.

cd backend_express
npm install

Crear el contenedor para el backend

docker build -t ${USER_NAME}/mande_backend .

Crear un contenedor con la imagen y conectarla con el servidor de bases de datos

docker run -it --rm -p 3000:3000 -v $(pwd):/usr/src/app --link mande_db:postgres --name mande_app ${USER_NAME}/mande_backend

Probar la aplicación

Visite las direcciones

localhost:3000/hello localhost:3000/usuario localhost:3000/usuario/1 localhost:3000/crear

=======

pet-app

531e8e5db808c02162cb36d1864e6a212c36c056

pet-app's People

Contributors

lauramoyano avatar rwxp avatar andcastillo 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.