Preparing for this chapter
This chapter uses the part2app
project from Chapter 10. Run the commands shown in Listing 11.1 in the part2app
folder to remove files that are no longer required.
Tip
You can download the example project for this chapter – and for all the other chapters in this book – from https://github.com/PacktPublishing/Mastering-Node.js-Web-Development. See Chapter 1 for how to get help if you have problems running the examples.
Listing 11.1: Removing files
rm ./templates/**/*.handlebars
rm ./templates/**/*.custom
rm ./src/client/*_custom.js
rm ./src/server/*custom*.ts
Next, replace the contents of the client.js
file in the src/client
folder with the contents shown in Listing 11.2.
Listing 11.2: The contents of the client.js file in the src/client folder
document.addEventListener('DOMContentLoaded', () => {
// do nothing
});
This is a placeholder until later in the chapter when client-side...