Browse Source

removed default api key pass from config

it will error on startup now, instead of allowing the application to be started with an unsafe password.
master
Blaine Motsinger 2 years ago
parent
commit
b36bdb2f94
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      config/application.js
  2. +2
    -2
      weather-api.js

+ 1
- 1
config/application.js View File

@ -4,7 +4,7 @@ let config = {};
config.address = '0.0.0.0';
config.port = 3000;
config.api_key = '1234567890qwerty';
config.api_key = '';
config.environment = 'development';
config.dht = 22;
config.pin = 4;


+ 2
- 2
weather-api.js View File

@ -3,7 +3,7 @@
"use strict";
const version = '0.1.11';
const version = '0.1.12';
const http = require( 'http' );
const moment = require( 'moment' );
@ -212,7 +212,7 @@ function verify_config_values ( done ) {
let value_match = valid_config[ key ];
if ( !value_match.test( config[ key ] ) ) {
return done ( Error ( 'config.' + key + ': ' + config[ key ] + ' is not a valid value' ) )
return done ( Error ( 'config.' + key + ': "' + config[ key ] + '" is not a valid value' ) )
}
}


Loading…
Cancel
Save