[app] Support env and defaults variable to specify app.

Closes #27.