Created
September 12, 2016 09:05
-
-
Save JonForest/64b506f1921172f4df535fe65a368b82 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') | |
| module.exports = function (server) { | |
| const publicPath = path.resolve(__dirname, '..', 'public') | |
| server.use('/public', server.loopback.static(publicPath)) | |
| const clientPath = path.resolve(__dirname, '..', '..', 'client', 'dist') | |
| server.use('/assets', server.loopback.static(path.resolve(clientPath, 'assets'))) | |
| server.use('/fonts', server.loopback.static(path.resolve(clientPath, 'fonts'))) | |
| server.get('/robots.txt', (req, res) => { | |
| res.sendFile(path.resolve(clientPath, 'robots.txt')) | |
| }) | |
| // serve ember index file on / | |
| server.get('*', (req, res) => { | |
| res.sendFile(path.resolve(clientPath, 'index.html')) | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment