-
Notifications
You must be signed in to change notification settings - Fork 0
Config
{
"bind_address": "http://*:9898",
"mysql_ip": "mysql.example.net",
"mysql_user": "admin",
"mysql_password": "",
"mysql_database": "homeworktracker",
"LoggingLevel": "3",
"StorageMethod": "RAM",
"TokenSecret": "Changing this will invalidate all tokens, make it unique so that it can't be cracked!",
"TokenExpirationHours": "168",
"TokenIssuer": "HomeworkTracker",
"TokenAudience": "HomeworkTrackerUsers"
}
The program will attempt to load the config from the active directory, if it can't find the file it will create the file and load the default config which is displayed above. If it finds the file but the file has missing options then the program will add the missing options to the file and set them to their default value
Default: http://*:9898
The address that the program should bind to, including the protocol, the IP/domain and the port. Setting the IP to * will bind it to all IPs/domains.
Default: mysql.example.net
The IP of the MySQL server to connect to for storage, only required if StorageMethod is set to MySQL.
Default: admin
The username for the MySQL user you want to connect with, only required if StorageMethod is set to MySQL.
Default:
The password of the MySQL server to connect to, only required if StorageMethod is set to MySQL.
Default: homeworktracker
The database to connect to, only required if StorageMethod is set to MySQL.
Default: 3
The severity of log message required for it to be logged to console and file.
Debug (3): Messages that may be helpful for debugging, this should only be used for debugging as it contains potentially confidential information.
Info (2): Information about what the server is doing, this includes all normal messages (Recommended).
Error (1): Prints errors only.
Nothing (0): Don't log.
Default: RAM
The method of storing application data including: User info (Name, ID, Credentials), Task Data.
RAM: Store all the data in objects that don't take up disk space and get deleted when the server closes (Bad for big servers).
File: Store all the data in a file that is saved when the server closes (Bad for big servers).
MySQL: Store all data in a MySQL database specified by the relevant config options (Recommended).
Default: Changing this will invalidate all tokens, make it unique so that it can't be cracked!
This is the token used to encrypt the JWT tokens used for authentication, make sure you change this to something unique and hard to guess/bruteforce otherwise the entire authentication system will be compromised. It can be any string of characters. Changing this will invalidate all tokens
Default: 168
This defines how long (in hours) the JWT tokens take to expire, this is basically how long someone will be logged in before they have to login again.
Default: HomeworkTracker
The issuer in the JWT tokens, this doesn't really do much, if you don't understand it then I recommend just leaving it. If you want to learn about it then read this (The issuer is the iss claim). Changing this will invalidate all tokens
Default: HomeworkTrackerUsers
The audience in the JWT tokens, this doesn't really do much, if you don't understand it then I recommend just leaving it. If you want to learn about it then read this (The issuer is the aud claim). Changing this will invalidate all tokens