Skip to content

Commit

Permalink
fix(@embark/webserver): load embark-ui sources from the correct path
Browse files Browse the repository at this point in the history
embark's webserver needs to serve the production build of embark-ui from the
root of the package not from dist/
  • Loading branch information
michaelsbradleyjr authored and iurimatias committed Nov 12, 2018
1 parent 23f19a0 commit 96f7688
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/modules/webserver/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 96f7688

Please sign in to comment.