Skip to content

Commit b168b82

Browse files
authored
Merge pull request #135 from ioet/fix-reload-page
closes #135
2 parents c21254e + f671c0c commit b168b82

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/CD-time-tracker-ui.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
name: Deploy to Azure
1616
runs-on: ubuntu-latest
1717
timeout-minutes: 60
18+
env:
19+
BUILD_PATH: 'dist/time-tracker'
20+
1821
steps:
1922
- name: Checkout of master
2023
uses: actions/checkout@master
@@ -37,6 +40,7 @@ jobs:
3740
run: |
3841
npm install
3942
npm run build --prod --if-present
43+
cp scripts/default-static-site.js ${BUILD_PATH}
4044
4145
- name: 'Deploy to Azure Web App'
4246
uses: azure/webapps-deploy@v1

scripts/default-static-site.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
const express = require('express');
3+
const server = express();
4+
const options = {
5+
index: ['index.html','hostingstart.html']
6+
};
7+
8+
server.use('/', express.static(__dirname, options));
9+
10+
server.get('/*', (req, res) => {
11+
res.sendFile(__dirname + "/" + options.index[0]);
12+
});
13+
14+
server.listen(process.env.PORT);

0 commit comments

Comments
 (0)