Skip to content

Commit

Permalink
Merge pull request #223 from alphagov/remove-unused-variables
Browse files Browse the repository at this point in the history
Remove / refactor some variable declarations
  • Loading branch information
NickColley authored Aug 10, 2016
2 parents ef480e9 + a5da682 commit 7b24354
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var basicAuth = require('basic-auth'),
config = require(__dirname + '/../app/config.js'),
fs = require('fs');
fs = require('fs'),
portScanner = require('portscanner'),
prompt = require('prompt');

Expand All @@ -23,7 +23,7 @@ exports.basicAuth = function(username, password) {
console.log('Username or password is not set.');
return res.send('<h1>Error:</h1><p>Username or password not set. <a href="https://github.com/alphagov/govuk_prototype_kit/blob/master/docs/guides/publishing-on-heroku.md#5-set-a-username-and-password">See guidance for setting these</a>.</p>');
}

var user = basicAuth(req);

if (!user || user.name !== username || user.pass !== password) {
Expand Down
2 changes: 0 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ var path = require('path'),
routes = require(__dirname + '/app/routes.js'),
favicon = require('serve-favicon'),
app = express(),
basicAuth = require('basic-auth'),
bodyParser = require('body-parser'),
browserSync = require('browser-sync'),
config = require(__dirname + '/app/config.js'),
port = (process.env.PORT || config.port),
utils = require(__dirname + '/lib/utils.js'),
packageJson = require(__dirname + '/package.json'),

Expand Down

0 comments on commit 7b24354

Please sign in to comment.