Check Cloud Web Environment

Hi all,

How can i easily check if my web App is running in the Xojo Cloud or not? (runtime)

Thanks Björn

#if TargetXojoCloud
// we’re on XojoCloud
#endif

Thanks :slight_smile:

For what it’s worth, this is not a runtime check. It’s a compile time constant which is set to True if your web app was built for Xojo Cloud. It’s a subtle but important distinction. For instance, you couldn’t use this directive in a console helper app that you built as Linux and then uploaded with your app or with SFTP. In that case, TargetXojoCloud is False.