This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const path = require('path'); | |
const app = express(); | |
// Run the app by serving the static files | |
// in the dist directory | |
app.use(express.static(__dirname + '/dist')); | |
// For all GET requests, send back index.html | |
// so that PathLocationStrategy can be used | |
app.get('/*', function(req, res) { | |
res.sendFile(path.join(__dirname + '/dist/index.html')); |