Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
3bfcbafc
Commit
3bfcbafc
authored
4 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
Separate development and testing configuration
parent
ece9da9c
master
MLAB-677
devel
patch-1
reset-jul13
reset-merge
testing
7 merge requests
!143
updating yml config
,
!64
Prepare production
,
!63
Prepare after testing
,
!62
Testing
,
!59
Mlab 240
,
!40
Mlab 26
,
!34
MLAB 129
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
app.js
+1
-1
app.js
config/config.js
+37
-4
config/config.js
routes/dbconn.js
+1
-1
routes/dbconn.js
routes/mailer.js
+1
-1
routes/mailer.js
with
40 additions
and
7 deletions
+40
-7
app.js
+
1
-
1
View file @
3bfcbafc
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
config/config.js
+
37
-
4
View file @
3bfcbafc
...
...
@@ -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
This diff is collapsed.
Click to expand it.
routes/dbconn.js
+
1
-
1
View file @
3bfcbafc
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 ====
...
...
This diff is collapsed.
Click to expand it.
routes/mailer.js
+
1
-
1
View file @
3bfcbafc
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
({
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets