Skip to content

Commit 96f7688

Browse files
michaelsbradleyjriurimatias
authored andcommitted
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/
1 parent 23f19a0 commit 96f7688

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/modules/webserver/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Server {
7373
this.app.use(coverageStyle);
7474

7575
this.app.use(express.static(path.join(fs.dappPath(this.dist)), {'index': ['index.html', 'index.htm']}));
76-
this.app.use('/embark', express.static(path.join(__dirname, '../../../embark-ui/build')));
76+
this.app.use('/embark', express.static(path.join(__dirname, '../../../../embark-ui/build')));
7777

7878
this.app.use(bodyParser.json()); // support json encoded bodies
7979
this.app.use(bodyParser.urlencoded({extended: true})); // support encoded bodies
@@ -118,7 +118,7 @@ class Server {
118118

119119
this.app.get('/embark/*', function(req, res) {
120120
self.logger.trace('webserver> GET ' + req.path);
121-
res.sendFile(path.join(__dirname, '../../../embark-ui/build', 'index.html'));
121+
res.sendFile(path.join(__dirname, '../../../../embark-ui/build', 'index.html'));
122122
});
123123

124124
if (this.enableCatchAll === true) {

0 commit comments

Comments
 (0)