Location for XML configuration file in Wt distribution - and other help needed
I want to use Wt for a C++ web app that I plan to create for a CS final project. I need to find the XML configuration that contains the line that I need to add my API key to in order to make use of the Google Maps API. I was told that I can find it in "/etc/wt/wt_config.xml", but I looked in the files I have and I can't find the etc/ folder anywhere. Could someone please help me out with this?
Also, it'd be much appreciated I could get a list of what Wt libraries depend on what Boost libraries, if any, so that I can link them all correctly to my project. And if someone would be kind as to point me to a good set of tutorials for Wt that can help me out when reading the ones on the Wt official site, that would also be a great help. Thanks.
RE: Location for XML configuration file in Wt distribution - and other help needed - Added by Osman Zakir 17 days ago
Sorry for the double post.
Update: I found the wt_config.xml file on GitHub. I just need to know where to add my API key on it and also what the shortcut way is for specifying the Wt root, so that I can specify the location of the file itself so that the rest of Wt would know where this file is; it's the "application settings" tag with the "location" attribute being where the path to the file is specified, right? Or am I misunderstanding?
RE: Location for XML configuration file in Wt distribution - and other help needed - Added by Wim Dumon 17 days ago
This is an example wt_config.xml that adds a number of properties:
Your google maps API key can likewise be configured as a property.
With respect to the location attribute: an asterisk means 'apply to all applications' and is what I usually use as I don't often share config files for multiple applications.
You can also specify something to apply the configuration for one specific application only, as explained in wt_config.xml:
<!-- Override settings for specific applications. Location refers to physical filesystem location of the application. The application prints this location (which corresponds to argv) to the log file on startup, and this should match exactly. --> <!-- <application-settings location="/var/www/localhost/wt-examples/hello.wt"> </application-settings> -->
Note that argv0 is not necessarily the full path, it can depend on how the program was exactly started. Look at the first output in the wt log to know the location of your binary.
Then write wt_config.xml to some location. Start up wt with the -c parameter to indicate where your config file is located.
hello.wt -c c:/abc/wt_config.xml --docroot c:/mydocroot --http-address 0.0.0.0 --http-port 8080
RE: Location for XML configuration file in Wt distribution - and other help needed - Added by Osman Zakir 9 days ago
So I create a tag "API-Key" and put the key there? And if so, I think it should go somewhere below "user-agents", but would that be a good idea?