简体   繁体   中英

Feathers.js Docker

I am currently trying to wire up Docker and Feathers.js. I have followed the tutorial showcased from their site: https://docs.feathersjs.com/cookbook/deploy/docker.html#create-an-app

I can't seem to figure out why I am not able to connect to it outside of the container. You can see below that the container is indeed running, but when I try to hit any endpoint I am getting a "There was an error connecting to http://localhost:3030/users ". You can view my Dockerfile below in the image (basically a copy from the Feathers site). End goal is to set this up with React, MongoDB and FeathersJS. React/Mongo are working well, but I can't get a connection to register for feathers either internally within docker containers, or through localhost as shown below.

在此处输入图片说明

As mentioned in this issue a previous version of the CLI was generating applications that are binding to the wrong hostname. Make sure that you are using the latest version of @feathersjs/cli and your src/index.js is using no hostname and looks like this:

const server = app.listen(port);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM