diff options
author | Zero~Informatique | 2019-12-22 07:40:55 +0100 |
---|---|---|
committer | Zero~Informatique | 2019-12-22 07:40:55 +0100 |
commit | dc251fffc2998f1cf4f8e9631928c4b92ac0d90e (patch) | |
tree | 2d0fbf73d63ce2c1f02bde7385688c45eb2a260a /viewer/vue.config.js | |
parent | 65465dd7d76b5729b62e39711004529e8d444241 (diff) | |
download | ldgallery-dc251fffc2998f1cf4f8e9631928c4b92ac0d90e.tar.gz |
viewer: Implemented the search by tags. Pushed the special urls to ENV.
Diffstat (limited to 'viewer/vue.config.js')
-rw-r--r-- | viewer/vue.config.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/viewer/vue.config.js b/viewer/vue.config.js index f116619..dbf1551 100644 --- a/viewer/vue.config.js +++ b/viewer/vue.config.js | |||
@@ -12,9 +12,9 @@ module.exports = { | |||
12 | port: 8085, | 12 | port: 8085, |
13 | serveIndex: true, | 13 | serveIndex: true, |
14 | before: (app, server, compiler) => { | 14 | before: (app, server, compiler) => { |
15 | app.get("/gallery/*", (req, res) => { | 15 | app.get(`${process.env.VUE_APP_DATA_URL}/*`, (req, res) => { |
16 | const fs = require("fs"); | 16 | const fs = require("fs"); |
17 | const fileName = req.url.replace(/^\/gallery/, "../example"); | 17 | const fileName = `../${process.env.VUE_APP_EXAMPLE_PROJECT}${req.url.slice(process.env.VUE_APP_DATA_URL.length)}`; |
18 | const file = fs.readFileSync(decodeURIComponent(fileName)); | 18 | const file = fs.readFileSync(decodeURIComponent(fileName)); |
19 | res.end(file); | 19 | res.end(file); |
20 | }); | 20 | }); |