As suggested by others:

  1. While testing without docker-compose the author forgot to expose ports. So run it docker run -p 3000:3000 -ti node-test:0.1
  2. If you are finding difficulties with nodemon (like it isn't restarting when you edit the files) simply replace the package.json start script with: "start": "nodemon -L app.js"
  3. If you're on Mac environment you'll probably cannot access your application using http://localhost:3000 because of a limitation of the Docker implementation (as mentioned in https://github.com/docker/for-mac/issues/155 and https://forums.docker.com/t/support-tap-interface-for-direct-container-access-incl-multi-host/17835/23). Instead of using localhost run docker-machine ip and get the ip address that you will use. In my case http://192.168.99.100:3000
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade