Home Explore Blog CI



docker

6th chunk of `content/get-started/workshop/06_bind_mounts.md`
7e533422e6a3d779f82b11337ad5c4f0c39a43730505038000000001000004d7
You can watch the container logs using Docker Desktop.

1. Select **Containers** in Docker Desktop.
2. Select your container name.

You'll know you're ready to go when you see this:

```console
nodemon -L src/index.js
[nodemon] 2.0.20
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node src/index.js`
Using sqlite database at /etc/todos/todo.db
Listening on port 3000
```

{{< /tab >}}
{{< /tabs >}}

### Develop your app with the development container

Update your app on your host machine and see the changes reflected in the container.

1. In the `src/static/js/app.js` file, on line
   109, change the "Add Item" button to simply say "Add":

   ```diff
   - {submitting ? 'Adding...' : 'Add Item'}
   + {submitting ? 'Adding...' : 'Add'}
   ```

   Save the file.

2. Refresh the page in your web browser, and you should see the change reflected
   almost immediately because of the bind mount. Nodemon detects the change and
   restarts the server. It might take a few seconds for the Node server to
   restart. If you get an error, try refreshing after a few seconds.

   

Title: Developing with a Development Container: Hot Reloading
Summary
This section explains how to develop within a development container, demonstrating hot reloading functionality. By making a simple change to the `src/static/js/app.js` file (changing "Add Item" to "Add"), saving the file, and refreshing the browser, the user can observe the immediate reflection of the change in the container due to the bind mount and Nodemon's automatic server restart.