Category : express

I have this in the Dockerfile in the users-service directory. FROM node:15-alpine COPY . /app WORKDIR /app RUN echo ">>>> $PWD" RUN ls -lart RUN yarn install RUN ls -lart /app/node_modules/.bin CMD yarn watch Current directory is /app as expected. Sequelize binary is there in the node_modules/.bin folder. Result of /app/node_modules/.bin command is… total 16 ..

Read more

There are 2 files in /config. local.json { "host": "localhost", "port": 3030, "env": "local" } dev.json { "host": "localhost", "port": 3030, "env": "dev" } Whenever the application runs, it should log something like info: Feathers application started on http://localhost:3030 in local, which "local" is the env variable in config file. index.js /* eslint-disable no-console */ ..

Read more

I am trying to Dockerize my API which uses Expressjs and MongoDB. When I run docker-compose up, MongoDB throws an error fullstack-products-api | MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 fullstack-products-api | at NativeConnection.Connection.openUri (/app/node_modules/mongoose/lib/connection.js:845:32) fullstack-products-api | at /app/node_modules/mongoose/lib/index.js:348:10 fullstack-products-api | at /app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5 fullstack-products-api | at new Promise (<anonymous>) fullstack-products-api | at promiseOrCallback (/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10) fullstack-products-api | at Mongoose._promiseOrCallback ..

Read more

I try to connect to mongoDB through docker-compose but i get the same error over and over again although i tried all the solutions from the net. Thank you. I have my docker-compose.yml as # Use root/example as user/password credentials version: ‘3.1’ services: mongo: image: mongo restart: always container_name: mongo ports: – 27017:27017 environment: MONGO_INITDB_ROOT_USERNAME: ..

Read more

Hi Dockerized a reactjs and expressjs project, everything is worked good when i have written separate docker compose file. But now i written one compose file docker-compose-all-dev.yml file version: ‘3.7’ services: client: container_name: react-dev build: context: ./client dockerfile: Dockerfile.react-dev ports: – 3000:3000 server: container_name: server-dev build: context: ./server dockerfile: Dockerfile.server-dev ports: – 5000:5000 Now it’s ..

Read more