Running Angular2 app with Node Js server
You forgot to add a middleware function to serve static files like js libs and css. Adding this line before app.get("/", ...)
should work:
app.use(express.static(__projectRoot));
after installing path packagenpm i path --save
use this on top
var path = require('path');and use this after
var app = express();
app.use(express.static(path.join(__dirname, 'your-dir-name')));