Adjusted routing so it will host main app from base and dev from base + 1
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
821c10816a
commit
fbb6e82177
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="icon" href="./frontend/icons-192.png" sizes="192x192">
|
||||
<link rel="icon" href="./icons-192.png" sizes="192x192">
|
||||
<script>'<base href="BASEPATH">';</script>
|
||||
<style>
|
||||
body {
|
||||
|
@ -40,6 +40,7 @@ app.use(basePath, require("./routes/basepath.js"));
|
||||
|
||||
/* Handle static files first so excessive logging doesn't occur */
|
||||
app.use(basePath, express.static("frontend", { index: false }));
|
||||
app.use(basePath + "dist", express.static("dist", { index: false }));
|
||||
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({
|
||||
|
@ -11,7 +11,7 @@ const proxy = {
|
||||
}
|
||||
|
||||
proxy[`${base}/`] = {
|
||||
target: "http://localhost:8766",
|
||||
target: "http://localhost:8765",
|
||||
bypass: function(req, res, proxyOptions) {
|
||||
console.log(req.url);
|
||||
if (req.url.match(new RegExp(base.replace(/\//g, "\\/") + "\/identities[/?]?"))) {
|
||||
@ -26,7 +26,7 @@ module.exports = merge(common, {
|
||||
mode: "development",
|
||||
devServer: {
|
||||
contentBase: path.join(__dirname, "/"),
|
||||
port: 8765,
|
||||
port: 8766,
|
||||
publicPath: `http://localhost:8765${base}/dist/`,
|
||||
hotOnly: true,
|
||||
disableHostCheck: true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user