Before writing this question, I'd like to state that I use Linux on a daily basis, which is why I'm creating this post to extend my knowledge of the other main operating systems I'm concerned about, Mac OS and Windows.I'm developing a NodeJS application that needs to read a configuration in order to understand what to do, and allow the user to customize some of the inner workings of the application through this configuration.However, this application is also cross-platform.  And I know that operating systems have different file structures for their own convenience.On a lot of Linux operating systems (if not all) I know that configurations are most commonly put in ~/.config/<app> or likely ~/.<app>/config if the first is not applicable...Although, my knowledge does not expand far enough to know if that's the same for Windows and Mac OS?What is considered the best place to put application configurations on Linux, Mac OS, and Windows?
Where is the appropriate place to put application configuration files for each popular operating system?
design;cross platform;configuration
Windows uses the %APPDATA% directory for user specific application configuration files. The %PROGRAMDATA% folder is used for system wide application configuration files, though it appears that Windows Store apps may not be able to use %PROGRAMDATA%.The registry is a hierarchical database included as part of Windows that can also store some config data as key-value pairs.For Mac OS X, the ~/Library folder is usually used, with /Library for global configs.Usually these are nested further, so your preferences would go in ~/Library/Preferences/ and some other files would go in ~/Library/Application SupportNote that in all of the above cases, you'll probably want to put your configurations under your app's name within the base location.