Integrate all Angular2 and Hapi routes
问题 Situation I'm developing a web application that uses Hapi server for REST calls and multi-page Angular2 website client-side. Hapi serves all Angular2 files to the client with: let serverDirPath = path.resolve(__dirname); server.route({ method: "GET", path: "/{param*}", config: { auth: false, handler: { directory: { path: path.join(serverDirPath, "../client"), index: true } } } }); Calling the server root successfully returns "index.html", and after that the Angular2 website works perfectly!