diff --git a/package.json b/package.json index 9f29e66..96bf8b0 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ }, "homepage": "https://github.com/RealOrangeOne/tstatic#readme", "dependencies": { + "basic-auth": "^1.1.0", "compression": "=1.6.2", "connect-static-file": "=1.1.2", "express": "=4.14.0", diff --git a/src/404.js b/src/404.js index 56217c3..c2675a8 100644 --- a/src/404.js +++ b/src/404.js @@ -1,6 +1,6 @@ const staticFile = require('connect-static-file'); const path = require('path'); -const { SERVE_DIR } = require('./utils'); +const { SERVE_DIR } = require('./consts'); const handle404 = staticFile(path.join(SERVE_DIR, '.404.html')); module.exports = function (request, response, next) { diff --git a/src/utils.js b/src/consts.js similarity index 100% rename from src/utils.js rename to src/consts.js diff --git a/src/server.js b/src/server.js index bdb00fa..de5097a 100755 --- a/src/server.js +++ b/src/server.js @@ -3,7 +3,7 @@ console.log('Starting Server...'); const app = require('express')(); -const utils = require('./utils'); +const utils = require('./consts'); const compression = require('compression'); const helmet = require('helmet'); diff --git a/src/static-files.js b/src/static-files.js index f0e02ba..773add7 100644 --- a/src/static-files.js +++ b/src/static-files.js @@ -1,6 +1,6 @@ const express = require('express'); const path = require('path'); -const { SERVE_DIR } = require('./utils'); +const { SERVE_DIR } = require('./consts'); module.exports.indexHandle = function (request, response, next) { if (request.url.endsWith('/')) {