-
Notifications
You must be signed in to change notification settings - Fork 23
Engine Settings
This page deal with the configuration of the FabMo Engine. It presents the actual settings that are implemented in the system.
The goal of the settings module is to avoid OS conflicts. It will also be in charge activating or deactivating modules of the Engine, if the system cannot handle theses (like the wifi manager module, which is specific to some Linux distributions).
The settings in the Engine are generated automatically by the system at the first launch of it. The settings are controlled by the settings.js file, and will create an app_settings.json file with the default configuration (this file will be JSON formatted).
You can change the app_settings.json file if you want to change theses settings. The settings.js file will control and approve the app_settings.json file , or throw an error if there is a problem with it. If a settings is omitted in the app_settings.json file, is value will be the default one.
-
"server_port"
the server_port settings define the port that the Engine Web server should run into.
Default value :8080 -
"driver"
the driver to use. currently only G2 is supported, and it's up to you to write a driver for your system, if you use something else.
Default value :"g2" -
"debug_lvl"
Default global level for the logger. the setting can be either an integer (from 0 to 3 ) or a string ("debug,"warn","info","error","none"). If none is set, the logger will use his own settings defined in log.js .
Default value :"info" -
"install_dir"
The folder for the root of the application, MUST be absolute (don't use the drive letter if you're under Windows).
Default value :"/opt/shopbot/" -
"parts_dir"
The folder for storing the parts. MUST be relative to the application's root folder.
Default value :"./parts/" -
"db_dir"
The folder for storing database related files. MUST be relative to the application's root folder.
Default value :"./db/" -
"log_dir"
The folder for saving logs. MUST be relative to the application's root folder. not used yet
Default value :"./logs/" -
"tmp_dir"
The folder for saving temporary files (mostly parts). MUST be relative to the application's root folder.
Default value :"./tmp/"
The settings.js module provides informations about the settings of the system to the Engine.
var settings = require("./settings");-
settings.server_port
return the value of the web server port to use. -
settings.driver
return the driver which is used in the application. -
settings.debug_lvl
return the global level of debugging -
settings.app_root_dir
return the root of the application -
settings.upload_dir
return the path of the folder where the parts are saved. -
settings.db_dir
return the path of the folder containing database files. -
settings.tmp_dir
return the path of the folder for temporary files. -
settings.wifiscanner
return true if the wifiscanner is active, or false if it's not.