Commit 3bfcbafc authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

Separate development and testing configuration

parent ece9da9c
......@@ -16,7 +16,7 @@ i18n.configure({
directory: './locales'
});
var env = process.env.NODE_ENV || 'development';
var env = process.env.NODE_ENV || 'testing';
const config = require('./config/config')[env];
var app = express();
......
......@@ -2,14 +2,48 @@ module.exports = {
development: {
app: {
name: 'User Account Management',
port: process.env.PORT || 9989
port: process.env.PORT || 9989,
host: 'http://localhost:9989'
},
passport: {
strategy: 'saml',
saml: {
path: process.env.SAML_PATH || '/saml/SSO',
entryPoint: process.env.SAML_ENTRY_POINT || 'https://m4lab.hft-stuttgart.de/idp/saml2/idp/SSOService.php',
issuer: 'sp-account.m4lab.hft-stuttgart.de', //local metadata
logoutUrl: 'https://m4lab.hft-stuttgart.de/idp/saml2/idp/SingleLogoutService.php'
}
},
database: {
host: 'localhost', // DB host
user: 'DBManager', // DB username
password: 'Stuttgart2019', // DB password
port: 3306, // MySQL port
dbUser: 'userdb', // User DB
host_project: 'localhost', // DB host project db
dbProject: 'projectDB' // Project DB
},
mailer: {
host: 'mail.hft-stuttgart.de', // hostname
secureConnection: false, // TLS requires secureConnection to be false
port: 587, // port for secure SMTP
authUser: 'ad\\support-transfer',
authPass: '6laumri2',
tlsCiphers: 'SSLv3',
from: 'support-transfer@hft-stuttgart.de',
}
},
testing: {
app: {
name: 'User Account Management',
port: process.env.PORT || 9989,
host: 'https://m4lab.hft-stuttgart.de/account'
},
passport: {
strategy: 'saml',
saml: {
path: process.env.SAML_PATH || '/saml/SSO',
entryPoint: process.env.SAML_ENTRY_POINT || 'https://m4lab.hft-stuttgart.de/idp/saml2/idp/SSOService.php',
//issuer: 'sp-account.m4lab.hft-stuttgart.de', //local metadata
issuer: 'sp-account-testing.m4lab.hft-stuttgart.de', //testing metadata
//issuer: 'sp-account-prod.m4lab.hft-stuttgart.de', //production metadata
logoutUrl: 'https://m4lab.hft-stuttgart.de/idp/saml2/idp/SingleLogoutService.php'
......@@ -22,7 +56,6 @@ module.exports = {
port: 3306, // MySQL port
dbUser: 'userdb', // User DB
host_project: 'm4lab.hft-stuttgart.de', // DB host project db
//host_project: 'localhost', // local
dbProject: 'projectDB' // Project DB
},
mailer: {
......@@ -35,4 +68,4 @@ module.exports = {
from: 'support-transfer@hft-stuttgart.de',
}
}
}
}
\ No newline at end of file
const mysql = require('mysql')
var env = process.env.NODE_ENV || 'development';
var env = process.env.NODE_ENV || 'testing';
const config = require('../config/config')[env]
// ==== USER ACOOUNT DB CONNECTION ====
......
const nodemailer = require('nodemailer')
var env = process.env.NODE_ENV || 'development';
var env = process.env.NODE_ENV || 'testing';
const config = require('../config/config')[env]
var smtpTransport = nodemailer.createTransport({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment