Tuesday 27 December 2016

What engine should I choose for my Angular2 app in Express?

1. I'm checking out this guide:http://ift.tt/2hmPGyK this guy puts his Angular app in express. Now I'm still very new to Angular2, however I'm fairly certain that LiteServer or whatever comes with the default testing is only for dev purposes rather than production.That said ... is it decent practice to use Express with my Angular2 app?2. it's 99% working (GET's are all 200 OK until this point), only getting this err at last second:GET /app/main.js 500 6.796 ms - 1170 Error: No default engine was specified and no extension was provided. at new View (/var/www/http://ift.tt/2i6jYdg) at EventEmitter.render (/var/www/http://ift.tt/2iCS859) at ServerResponse.render (/var/www/http://ift.tt/2i6ddIi) at /var/www/http://ift.tt/2iCRsga at Layer.handle_error (/var/www/http://ift.tt/2i6dET9) at trim_prefix (/var/www/http://ift.tt/2iCReFK) at /var/www/http://ift.tt/2i617il at Function.process_params (/var/www/http://ift.tt/2iCYyl3) at next (/var/www/http://ift.tt/2i681nW) at Layer.handle_error (/var/www/http://ift.tt/2iD10Ia) However, every guide I've read says that as long as I put a static dir, I don't need to specify an engine, so this is strange. In my app.js:app.use(express.static(path.join(__dirname, 'client')));

Submitted December 28, 2016 at 06:44AM by xblade724

No comments:

Post a Comment