I don't know whether it should be me or the author of the project template to feel embarrassed. In the Index.cshtml file, main.js is loaded by this line:
<script type="text/javascript"
src="~/Scripts/require.js"
data-main="/App/main">
</script>
Really? An absolute URL?
At least it's easy to fix.
Either remove the leading slash or add a base tag to the HTML like this:
<html>
<head>
<base href="http://myserver/path/to/app/root/" />
You're better off removing the leading slash from data-main
because with a relative path you can publish to any location. I suppose you could also specify a relative base for the base tag but I've never tested it and it's more code anyway.
<script type="text/javascript"
src="~/Scripts/require.js"
data-main="App/main">
</script>