Live Editing and Debugging
Learn how changes are reflected in a running app and how you can debug it.
Live code editing
When the nodehello
container is running in development mode, you can edit index.js
, and Nodemon will restart the application when you save the file.
For example, examine line 17:
const message = `Hello ${ req.params.name || 'World' }!`;
and change Hello
to Hey there
:
const message = `Hey there, ${ req.params.name || 'World' }!`;
Practice
Click on the “Run” button and then click the URL on “Your app can found at:”; you will be able to see “Hey there, World!”
Now replace there
on line 17 with your_name, click on the “Run” button, and refresh the browser.
Get hands-on with 1400+ tech skills courses.