Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/config/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* *******************************************************************************
* * Copyright (c) 2019 Edgeworx, Inc.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Eclipse Public License v. 2.0 which is available at
* * http://www.eclipse.org/legal/epl-2.0
* *
* * SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*
*/

module.exports = {
'App:Name': 'iofog-controller',

'Server:Port': 54421,
'Server:DevMode': false,

'Email:ActivationEnabled': false,
'Email:HomeUrl': 'https://iofog.org',

'Service:LogsDirectory': '/var/log/iofog-controller',
'Service:LogsFileSize': 1048576,

'Settings:DefaultJobIntervalSeconds': 120,
'Settings:UserTokenExpirationIntervalSeconds': 3600,
'Settings:FogTokenExpirationIntervalSeconds': 3600,
'Settings:FogStatusUpdateIntervalSeconds': 120,
'Settings:FogStatusFrequencySeconds': 60,

'Diagnostics:DiagnosticDir': 'diagnostic',
}
3 changes: 2 additions & 1 deletion src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

const nconf = require('nconf')
const path = require('path')
const constants = require('./constants');

class Config {
constructor() {
Expand All @@ -22,7 +23,7 @@ class Config {
}

get(key) {
return nconf.get(key)
return nconf.get(key) || constants[key]
}

set(key, value) {
Expand Down