Hi, I would just like some help setting up angular2 to run from a public folder under hapijs. Atm i have read several other issues about this, but none seem to resolve my problem.
any help would be greatly appreciated.
What is it that you want to do exactly and what problem(s) are you facing?
Also general hapi question should go https://github.com/hapijs/discuss (the hapijs/hapi issues are for hapi bugs etc)
well i am trying to use this:
server.ext('onPreResponse', function (request, reply) {
var response = request.response;
console.log(request.url);
if (!response.isBoom ||
response.output.statusCode !== 404) {
return reply();
}
reply.file('./public/index.html');
});
to route 404's back to index.html but just get system js can not be found in the angular app, well returns index.html instead of the system.js file.
Look at the boilerplates: http://hapijs.com/resources#Boilerplates. There are examples for React, Angular, etc.
I looked, I see nothing for Angular2
I think this was added later on.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
Most helpful comment
I looked, I see nothing for Angular2