From 396906dde12a0008998976e2dd437a0b79164dd3 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Sat, 26 Mar 2016 00:09:07 -0700 Subject: [PATCH] Update npm-http-server dep --- package.json | 3 ++- server.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 38392f1..4588741 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,12 @@ "registryURL": "https://registry.npmjs.org", "bowerBundle": "/bower.zip", "redirectTTL": 500, + "autoIndex": true, "port": 5000 }, "dependencies": { "cors": "^2.7.1", "express": "^4.13.4", - "npm-http-server": "^2.4.1" + "npm-http-server": "^2.5.0" } } diff --git a/server.js b/server.js index d577bda..94dc6a5 100644 --- a/server.js +++ b/server.js @@ -5,6 +5,7 @@ const cors = require('cors') const registryURL = process.env.npm_package_config_registryURL const bowerBundle = process.env.npm_package_config_bowerBundle const redirectTTL = process.env.npm_package_config_redirectTTL +const autoIndex = process.env.npm_package_config_autoIndex const port = process.env.PORT || process.env.npm_package_config_port const app = express() @@ -14,7 +15,8 @@ app.use(express.static('public', { maxAge: 60000 })) app.use(createRequestHandler({ registryURL: registryURL, bowerBundle: bowerBundle, - redirectTTL: redirectTTL + redirectTTL: redirectTTL, + autoIndex: autoIndex })) app.listen(port, function () {