I\'m using boot2docker on OS X and cloned the following repo:
https://github.com/enokd/docker-node-hello
It basically has a Dockerfile and a very simple express
Your question is really interesting, and (partially) not specifically related to Docker. Let me say that the main and final problem here is the use of a virtual machine.
Tracking code changes on host computer can be a challenge when you use a VM (bare Virtualbox VM, Vagrant VM, Docker boot2docker VM...)
The VM is a complete layer of abstraction between your Mac (where your code changes happen) and your application stack (here, the Docker container running on a tiny Linux VM).
You have to explicitly define a shared folder (NFS, ...) in Virtualbox, between your Mac and boot2docker. This shared folder would be the root of your code repository. That's the first step.
Mac: /Users/You/stuff/approot ===> boot2docker: /something
docker run -v /something:/app/path/inside/docker -p 49160:8080 \ -d gasi/centos-node-hello /usr/bin/node /app/path/inside/docker/index.js
Having NodeJs detecting files change is another challenge. You need an additional wrapper watching the filesystem and restarting Node upon code changes (Forever, Nodemon...).
And, after that since the changes don't occur on a local filesystem, but on a shared folder, you'll probably have to tell the Nodejs watcher (Forever/Nodemon/...) to use polling mode. It works (more or less) but will burn a lot of CPU.