updated nano to use secure couchdb

This commit is contained in:
Martin Donnelly 2016-05-12 15:16:52 +01:00
parent 3937db3284
commit bd7bedae9f
3 changed files with 14 additions and 0 deletions

1
htpasswd.txt Normal file
View File

@ -0,0 +1 @@
martind2000:ae7dfe3f3ba4d1132f8c7d7e5a2d05676127458a8842b9c28cea7662ad45393c

View File

@ -8,8 +8,20 @@ var express = require('express'), path = require('path'), http = require('http')
loggerHandler = require('./server/loggerhandler')
;
var authentication =require('basic-authentication');
var app = express();
app.use(authentication(({
hash: 'sha256', // type of hash
file: 'htpasswd.txt', // path of file
suppress: true // suppress throwing Error if wrong user
})));
app.set('port', process.env.PORT || 8027);
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');

View File

@ -9,6 +9,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"basic-authentication": "^1.6.2",
"body-parser": "^1.15.0",
"cheerio": "^0.20.0",
"cookie-parser": "^1.4.1",