1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

adding mysql setting alliances

This commit is contained in:
Patrik J. Braun 2019-01-27 15:10:01 -05:00
parent 67ba7a707f
commit 1f8bc784ef
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,8 @@ language: node_js
node_js: node_js:
- '10' - '10'
- '11' - '11'
env:
- MYSQL_HOST='localhost' MYSQL_PASSWORD='' MYSQL_USERNAME='root' MYSQL_DATABASE='pigallery2_test'
services: services:
- mysql - mysql
addons: addons:

View File

@ -63,7 +63,11 @@ export class PrivateConfigClass extends PublicConfigClass implements IPrivateCon
public load() { public load() {
ConfigLoader.loadBackendConfig(this, ConfigLoader.loadBackendConfig(this,
path.join(__dirname, './../../../config.json'), 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) { 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); throw new Error('Unknown user role for Client.unAuthenticatedUserRole, found: ' + this.Client.unAuthenticatedUserRole);