Make ANDROID=1 npm start work again, as it broke at some point

This commit is contained in:
Donovan Preston 2019-01-10 15:08:16 -05:00
parent 4a633c8930
commit 52b4c382cb
1 changed files with 5 additions and 2 deletions

View File

@ -21,7 +21,10 @@ module.exports = function(app, devServer) {
const index = devServer.middleware.fileSystem const index = devServer.middleware.fileSystem
.readFileSync(devServer.middleware.getFilenameFromUrl('/android.html')) .readFileSync(devServer.middleware.getFilenameFromUrl('/android.html'))
.toString() .toString()
.replace('<base href="file:///android_asset/" />', ''); .replace(
'<base href="file:///android_asset/" />',
'<base href="http://localhost:8080/" />'
);
res.set('Content-Type', 'text/html'); res.set('Content-Type', 'text/html');
res.send(index); res.send(index);
} }
@ -30,7 +33,7 @@ module.exports = function(app, devServer) {
app.get('/', android); app.get('/', android);
app.get('/legal', android); app.get('/legal', android);
app.get(`/share/:id${ID_REGEX}`, android); app.get(`/share/:id${ID_REGEX}`, android);
app.get(`/download/:id${ID_REGEX}`, android); app.get(`/download/:id${ID_REGEX}/:key`, android);
app.get('/completed', android); app.get('/completed', android);
app.get('/preferences', android); app.get('/preferences', android);
app.get('/options', android); app.get('/options', android);