0

I am trying to build and release front-end app based on quasar on Azure Portal.

Building is OK.

Releasing is OK, but when I go to the apps link I see standard welcome screen:

enter image description here

I checked deployed code via SSH it is there, but it is located on "/home/site/wwwroot/index.html"

enter image description here

How do I point to the correct folder with my app? Thank you!

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
podeig
  • 2,597
  • 8
  • 36
  • 60

1 Answers1

0

Firstly there is an official doc about this: how to set the default document in a Node.js app.

It uses express to solve it, Create index.js there with the following code, then restart your app then it will work.

var express = require('express');
var server = express();
var options = {
index: 'index.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

Except this, there is another way to solve it, use pm2 since that is already part of the stack. Add the below startup command for the app:

pm2 serve /home/site/wwwroot --no-daemon

enter image description here

After restart the app, it will pick the index pages from the wwwroot.

George Chen
  • 13,703
  • 2
  • 11
  • 26