Created
August 25, 2018 18:02
-
-
Save jkasun/b18ab409beea43d36f1458a10abcbcb2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 path = require('path'); | |
const express = require('express'); | |
const app = express() | |
app.use('/public', express.static(__dirname + '/../app/public')); | |
app.get('/*', function (req, res) { | |
res.sendFile(path.join(__dirname + '/../app/index.html')); | |
}); | |
app.listen(3000, () => { | |
console.log('Sample SPA is running on port 3000!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment