diff --git a/.travis.yml b/.travis.yml index b1860aa9..0c010b7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ language: node_js node_js: - '10' - '11' +env: + - MYSQL_HOST='localhost' MYSQL_PASSWORD='' MYSQL_USERNAME='root' MYSQL_DATABASE='pigallery2_test' services: - mysql addons: diff --git a/common/config/private/PrivateConfigClass.ts b/common/config/private/PrivateConfigClass.ts index 585daa0a..0f5dfa4a 100644 --- a/common/config/private/PrivateConfigClass.ts +++ b/common/config/private/PrivateConfigClass.ts @@ -63,7 +63,11 @@ export class PrivateConfigClass extends PublicConfigClass implements IPrivateCon public load() { ConfigLoader.loadBackendConfig(this, path.join(__dirname, './../../../config.json'), - [['PORT', 'Server-port']]); + [['PORT', 'Server-port'], + ['MYSQL_HOST', 'Server-database-mysql-host'], + ['MYSQL_PASSWORD', 'Server-database-mysql-password'], + ['MYSQL_USERNAME', 'Server-database-mysql-username'], + ['MYSQL_DATABASE', 'Server-database-mysql-database']]); if (Utils.enumToArray(UserRoles).map(r => r.key).indexOf(this.Client.unAuthenticatedUserRole) === -1) { throw new Error('Unknown user role for Client.unAuthenticatedUserRole, found: ' + this.Client.unAuthenticatedUserRole);