Configuration of MobileFirst applications on the server

You can configure each MobileFirst application by specifying a set of configuration parameters on the server side.

MobileFirst application configuration parameters configure the database, push notifications, the use of SSL to secure communications between the server and the client application, and other settings.

When you develop a MobileFirst application, you use the worklight.properties file to specify most of the configuration parameters. This file is in the server/conf folder in the project. You use the worklight.properties file during development to test a particular configuration. For example, if you want to use the analytics features during development, you might set the wl.analytics.url property to a valid URL in the worklight.properties file.

When your MobileFirst project is built by MobileFirst Studio, the project WAR file that is created in the project bin folder contains the configuration that is specified in the worklight.properties file. The values for the parameters that are specified in the worklight.properties file then define the default configuration of your application.

When you deploy your project (your WAR file) to the production or test environment, your configuration is certain to be different from the development environment. It is easy to modify the configuration to fit the new environment because the project WAR file defines JNDI environment entries for each parameter that can be configured in a production environment. You leave the values in the worklight.properties file unchanged; instead, you specify the configuration during the deployment to the application server.

See JNDI environment entries for MobileFirst projects in production to learn about the JNDI environment entries that you can specify in a production environment. Properties that are relevant only in development environments are not available as JNDI entries.

Within the worklight.properties file, you can define some application-specific configuration properties; for example, to configure the URL of a service that is called from the mobile application and the URL is different in production, development, and test environments. See Declaring and using application-specific configuration properties to learn how to create such configuration properties.