On my Google AppEngine (GAE) server, I'd like to do something like this:
if (thisIsTheDefaultServer)
{
// behave normally
}
else
{
// Accept special test-commands, give extra output, etc.
}
is there a way for the server code to determine if it's the current default version?
Thanks!
The only way you can delete the default version of your App Engine app is by deleting your project. However, you can stop the default version in the GCP Console. This action shuts down all instances associated with the version. You can restart these instances later if needed.
Compute Engine delivers configurable virtual machines running in Google's data centers with access to high-performance networking infrastructure and block storage solutions. App Engine is a fully managed, serverless platform for developing and hosting web applications at scale.
The standard environment can scale from zero instances up to thousands very quickly. In contrast, the flexible environment must have at least one instance running for each active version and can take longer to scale up in response to traffic. Standard environment uses a custom-designed autoscaling algorithm.
There's not currently any way to do this, but you might want to reconsider your requirements. Two alternatives spring to mind:
version.app.appspot.com
name, you may or may not be the default version, but should probably enable the different behavior anyway.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With