Custom static files middleware
This commit is contained in:
parent
fa22736644
commit
d1e23af74b
|
@ -18,7 +18,6 @@
|
|||
"async": "^2.5.0",
|
||||
"axios": "^0.17.0",
|
||||
"express": "^4.13.4",
|
||||
"express-static-gzip": "^0.3.2",
|
||||
"front-matter": "^2.2.0",
|
||||
"jsonfile": "^4.0.0",
|
||||
"markdown-it": "^8.4.0",
|
||||
|
|
|
@ -44,8 +44,8 @@ require('./utils/scanner')();
|
|||
var api = require('./utils/api');
|
||||
app.use("/api", api);
|
||||
|
||||
var expressStaticGzip = require("express-static-gzip");
|
||||
app.use("/static", expressStaticGzip(path.join(process.cwd(), '/public/static')));
|
||||
var staticFiles = require('./utils/staticFiles');
|
||||
app.use("/static", staticFiles);
|
||||
|
||||
var serverRender = require('./utils/serverRender');
|
||||
app.get("*", serverRender);
|
||||
|
|
|
@ -2293,12 +2293,6 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2:
|
|||
dependencies:
|
||||
homedir-polyfill "^1.0.1"
|
||||
|
||||
express-static-gzip@^0.3.2:
|
||||
version "0.3.2"
|
||||
resolved "https://registry.yarnpkg.com/express-static-gzip/-/express-static-gzip-0.3.2.tgz#89ede84547a5717de3146315f62dc996c071a88d"
|
||||
dependencies:
|
||||
serve-static "^1.12.3"
|
||||
|
||||
express@^4.13.4:
|
||||
version "4.16.3"
|
||||
resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53"
|
||||
|
@ -5769,7 +5763,7 @@ serialize-javascript@^1.4.0:
|
|||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe"
|
||||
|
||||
serve-static@1.13.2, serve-static@^1.12.3:
|
||||
serve-static@1.13.2:
|
||||
version "1.13.2"
|
||||
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1"
|
||||
dependencies:
|
||||
|
|
Loading…
Reference in New Issue