Skip to content

Commit

Permalink
Merge pull request #271 from ptcrealitylab/update-userinterface-path
Browse files Browse the repository at this point in the history
Update userinterface path
  • Loading branch information
benptc authored Jan 27, 2021
2 parents a749fad + 8f31672 commit 0dd897e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1373,12 +1373,14 @@ function objectWebServer() {
webServer.use(bodyParser.json());
// define a couple of static directory routs


webServer.use('/objectDefaultFiles', express.static(__dirname + '/libraries/objectDefaultFiles/'));
if (isMobile) {
const LocalUIApp = require('./libraries/LocalUIApp.js');
const uiPath = path.join(__dirname, '../userinterface');
const localUserInterfaceApp = new LocalUIApp(uiPath, addonFolders);
const uiPath = path.join(__dirname, '../vuforia-spatial-toolbox-userinterface');
const alternativeUiPath = path.join(__dirname, '../userinterface'); // for backwards compatibility
const selectedUiPath = fs.existsSync(uiPath) ? uiPath : alternativeUiPath;
console.log('SELECTED UI PATH: ' + selectedUiPath);
const localUserInterfaceApp = new LocalUIApp(selectedUiPath, addonFolders);
localUserInterfaceApp.setup();
localUserInterfaceApp.listen(serverUserInterfaceAppPort);
}
Expand Down

0 comments on commit 0dd897e

Please sign in to comment.