rename utils to consts

This commit is contained in:
Jake Howard 2017-01-21 18:22:50 +00:00
parent ea37209be1
commit 35fbefef03
5 changed files with 4 additions and 3 deletions

View file

@ -25,6 +25,7 @@
}, },
"homepage": "https://github.com/RealOrangeOne/tstatic#readme", "homepage": "https://github.com/RealOrangeOne/tstatic#readme",
"dependencies": { "dependencies": {
"basic-auth": "^1.1.0",
"compression": "=1.6.2", "compression": "=1.6.2",
"connect-static-file": "=1.1.2", "connect-static-file": "=1.1.2",
"express": "=4.14.0", "express": "=4.14.0",

View file

@ -1,6 +1,6 @@
const staticFile = require('connect-static-file'); const staticFile = require('connect-static-file');
const path = require('path'); const path = require('path');
const { SERVE_DIR } = require('./utils'); const { SERVE_DIR } = require('./consts');
const handle404 = staticFile(path.join(SERVE_DIR, '.404.html')); const handle404 = staticFile(path.join(SERVE_DIR, '.404.html'));
module.exports = function (request, response, next) { module.exports = function (request, response, next) {

View file

@ -3,7 +3,7 @@
console.log('Starting Server...'); console.log('Starting Server...');
const app = require('express')(); const app = require('express')();
const utils = require('./utils'); const utils = require('./consts');
const compression = require('compression'); const compression = require('compression');
const helmet = require('helmet'); const helmet = require('helmet');

View file

@ -1,6 +1,6 @@
const express = require('express'); const express = require('express');
const path = require('path'); const path = require('path');
const { SERVE_DIR } = require('./utils'); const { SERVE_DIR } = require('./consts');
module.exports.indexHandle = function (request, response, next) { module.exports.indexHandle = function (request, response, next) {
if (request.url.endsWith('/')) { if (request.url.endsWith('/')) {