I think it works this way. TFS uses simple
std::getenv
to load environment variables from system:
en.cppreference.com
not some advanced library to process
.env
files etc. (like PHP, Python and NodeJS frameworks do)
A free and open-source MMORPG server emulator written in C++ - otland/forgottenserver
github.com
looks like mistake. I also assumed that all I have to do is to rename it to
.env
and set my variables, but it does not work that way.
You got to copy these variables and execute them in terminal, to set them as temporary env variables.
I've reported that problem:
Pull Request Prelude I have followed proper The Forgotten Server code styling. I have read and understood the contribution guidelines before making this PR. I am aware that this PR may be clo...
github.com
It will be changed to first reading config from
config.lua
and then overwriting it by environment variables if they are defined - (still not
.env
file).
After that change database config will be back in
config.lua
.
FOR NOW you must define your mysql config in
config.lua
(it will overwrite any env variables):
Code:
mysqlHost = "127.0.0.1"
mysqlUser= "root"
mysqlPass= ""
mysqlDatabase= "tfs_dbmasters"
mysqlSock= ""
mysqlPort= 3306