Later, we set a property for the file so that it's automatically executed when the server starts. This is what's called a bootstrap file. There are two ways to create a bootstrap file: Change its role (that's what we've done in this example), or put it in a "bootStrap" folder in the solution.
You may have noticed that we pass the function handler by its name. We do not pass the function itself directly. There are two main reasons for this behavior:
This example is basic. In a real life application, you will probably split your handlers into different .js files and have one "bootStrap" file containing several calls to addHttpRequestHandler(). And it is likely that you don't want to load all the scripts for each request.