stephanos
stephanos

Reputation: 3339

How to set Lift run mode on App Engine

I'm successfully running a Lift 2.4 app on App Engine. I only have problems with the run mode.

Lift determines the run mode, production or development, via:

System.getProperty("run.mode")

The only way to set a property on App Engine is via:

<system-properties>
    <property name="run.mode" value="production"/>
</system-properties>

BUT now when I start the App Engine development server locally, it's also in production mode.

I tried overriding it by specifying a system property on JVM start or Lift boot, didn't work.

How can I have production mode in the Cloud and development mode locally?

Upvotes: 2

Views: 506

Answers (1)

Alois Cochard
Alois Cochard

Reputation: 9862

By using different configuration file for different environment (production/development).

Take a look at your build tool manual to find how exactly you can handle configuration file per environment.

For maven:

https://maven.apache.org/guides/mini/guide-building-for-different-environments.html

Upvotes: 1

Related Questions