Move settings invocation to init phase

This commit is contained in:
Gaël Métais
2021-03-16 07:45:10 +00:00
parent e2b713282c
commit c5bc02d45d
+2 -1
View File
@@ -4,6 +4,8 @@ var Q = require('q');
var fs = require('fs');
var path = require('path');
var serverSettings = require('../server_config/settings.json');
var screenshotHandler = function() {
@@ -110,7 +112,6 @@ var screenshotHandler = function() {
// Chrome saves a temporary file on the disk, which is then removed.
// Its default folder is /tmp, but it can be changed in server_config/settings.json
var serverSettings = require('../server_config/settings.json');
var tmpFolderPath = serverSettings.screenshotTempPath || '/tmp';
var tmpFileName = 'temp-chrome-screenshot.png';
var tmpFileFullPath = path.join(tmpFolderPath, tmpFileName);