fix(@embark/webserver): load embark-ui sources from the correct path

embark's webserver needs to serve the production build of embark-ui from the
root of the package not from dist/
This commit is contained in:
Michael Bradley, Jr 2018-11-12 10:43:45 -06:00 committed by Iuri Matias
parent 23f19a0df5
commit 96f7688ee8

View File

@ -73,7 +73,7 @@ class Server {
this.app.use(coverageStyle);
this.app.use(express.static(path.join(fs.dappPath(this.dist)), {'index': ['index.html', 'index.htm']}));
this.app.use('/embark', express.static(path.join(__dirname, '../../../embark-ui/build')));
this.app.use('/embark', express.static(path.join(__dirname, '../../../../embark-ui/build')));
this.app.use(bodyParser.json()); // support json encoded bodies
this.app.use(bodyParser.urlencoded({extended: true})); // support encoded bodies
@ -118,7 +118,7 @@ class Server {
this.app.get('/embark/*', function(req, res) {
self.logger.trace('webserver> GET ' + req.path);
res.sendFile(path.join(__dirname, '../../../embark-ui/build', 'index.html'));
res.sendFile(path.join(__dirname, '../../../../embark-ui/build', 'index.html'));
});
if (this.enableCatchAll === true) {