support multiple applications.
move configuration to database