Node.js/Express redirect all to angular 2 page
问题 I am creating an Angular 2 app with Node.js and Express. The problem I am having is that my routes file doesnt work with a wildcard. Everytime I visit the page with anything other then / (for example /test ) it says the following: ReferenceError: path is not defined My server.js: const express = require('express'); const app = express(); const path = require('path'); const routes = require('./routes'); const data = require('./articles.json'); app.use(express.static(path.join(__dirname, '/dist