diff --git a/config/default.js b/config/default.js new file mode 100644 index 0000000000000000000000000000000000000000..c76177ff6427bde241cf13686cfdc46e90b418dc --- /dev/null +++ b/config/default.js @@ -0,0 +1,35 @@ +/** + * File: default.js + * Author: Markus Grigull <mgrigull@eonerc.rwth-aachen.de> + * Date: 10.05.2018 + * + * This file is part of VILLASweb-backend. + * + * VILLASweb-backend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VILLASweb-backend is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with VILLASweb-backend. If not, see <http://www.gnu.org/licenses/>. + ******************************************************************************/ + +'use strict'; + +module.exports = { + port: 4000, + databaseName: 'VILLAS', + databaseURL: 'mongodb://localhost:27017', + secret: 'longsecretislong', + amqpEndpoint: 'amqp://localhost', + amqpUpdateRate: 60, + logLevel: 'error', + logFile: './log.txt', + publicDir: '../public', + defaultAdmin: false +}; diff --git a/config/development.js b/config/development.js new file mode 100644 index 0000000000000000000000000000000000000000..1dcb01171807c0292edb81b381e02bee53782574 --- /dev/null +++ b/config/development.js @@ -0,0 +1,29 @@ +/** + * File: development.js + * Author: Markus Grigull <mgrigull@eonerc.rwth-aachen.de> + * Date: 10.05.2018 + * + * This file is part of VILLASweb-backend. + * + * VILLASweb-backend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VILLASweb-backend is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with VILLASweb-backend. If not, see <http://www.gnu.org/licenses/>. + ******************************************************************************/ + +'use strict'; + +module.exports = { + amqpUpdateRate: 5, + logLevel: 'verbose', + logFile: null, + defaultAdmin: true +}; diff --git a/config/index.js b/config/index.js index 0010d95ed72265704054808223187523210a6380..56257843b0b3dbd35f77fd4a5709ebadf045571a 100644 --- a/config/index.js +++ b/config/index.js @@ -23,7 +23,7 @@ const _ = require('lodash'); -const defaults = require('./default'); +const defaults = require('./default').default; const config = require('./' + (process.env.NODE_ENV || 'development')); // merge configuration file with defaults