# Is it live, or is it dev?

**URL:** <https://forum.bubble.io/t/is-it-live-or-is-it-dev/140093>\
**Category:** Plugin builders\
**Created:** [March 8, 2021, 3:05pm UTC](https://forum.bubble.io/t/is-it-live-or-is-it-dev/140093 "2021-03-08T15:05:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [March 8, 2021, 3:05pm UTC](https://forum.bubble.io/t/is-it-live-or-is-it-dev/140093/1 "2021-03-08T15:05:00Z")

</div>

Is it possible for a plug-in to know whether it’s running in the live or development version of an app?

I can’t seem to find such a flag in the plug-in docs, but I hope I’m overlooking something. In the absence of an “official” indicator, has anyone come up with a tip or trick for checking this?

---

<div class="post-metadata">

**Author:** ![vini\_brito](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vini_brito/32/22187_2.png) [@vini\_brito](https://forum.bubble.io/u/vini_brito)\
**Post date:** [March 8, 2021, 6:41pm UTC](https://forum.bubble.io/t/is-it-live-or-is-it-dev/140093/2 "2021-03-08T18:41:22Z")

</div>

Two things I can think of, but they’re not completely 100% future proof as it’s not an official API and they may change, but you can check if the url contains version-test right after the domain name and also bubble declares this variable upon page load, so you can check it too:

```auto
var app = {};
app = {};
app["last_change"] = "4621869430";
app["last_change_as_of"] = 1615228286465;
app["_id"] = "unlimitedbubbling";
app["app_version"] = "test";
// ... a lot more stuff

```

So if you do `console.log(app.app_version)` you get this: “test”.

A more stable way is to have a yes/no field in the plugin that you instruct the user to pass the “isn’t not live testing version” (😂) data.

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [March 8, 2021, 7:06pm UTC](https://forum.bubble.io/t/is-it-live-or-is-it-dev/140093/3 "2021-03-08T19:06:18Z")

</div>

Thanks, @vini_brito. I appreciate you taking the time to reply.

> [@vini\_brito](#):
>
> you can check if the url contains version-test

Yeah, that occurred to me, but I dismissed it, since it will break under Bubble plans that offer different versions.

> [@vini\_brito](#):
>
> also bubble declares this variable upon page load

Now that **didn’t** occur to me. I think that might suit me for now, assuming it says “test” for any app version except the live / production version.

(I understand about the special property, but I’d rather not bother the user about it for this use case. I’m actually doing exactly that in a different plugin though, so great advice!)

Thanks much!

-Steve

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [March 9, 2021, 4:25pm UTC](https://forum.bubble.io/t/is-it-live-or-is-it-dev/140093/4 "2021-03-09T16:25:06Z")

</div>

> [@vini\_brito](#):
>
> `app["app_version"]`

@vini_brito brings home the gold (star)! 🌟

While the `app_version` property will have a different value for different development versions, it will always be “live” for the live version. Thus, one can simply test for “live” to determine if it’s production or development.

-Steve

---

<div class="post-metadata">

**Author:** ![redvivi](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/redvivi/32/59955_2.png) [@redvivi](https://forum.bubble.io/u/redvivi)\
**Post date:** [March 27, 2021, 6:33pm UTC](https://forum.bubble.io/t/is-it-live-or-is-it-dev/140093/5 "2021-03-27T18:33:50Z")

</div>

A tricky one for you @sudsy and @vini_brito , which seems to me conceptually impossible to implement: how to detect from a plugin Server-side action code that it is running from the “App to test the plugin” ?

---

<div class="post-metadata">

**Author:** ![alberto.vegas](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@alberto.vegas](https://forum.bubble.io/u/alberto.vegas)\
**Post date:** [March 3, 2022, 1:03pm UTC](https://forum.bubble.io/t/is-it-live-or-is-it-dev/140093/6 "2022-03-03T13:03:15Z")

</div>

It occurs to me that you could use a flag stored in the database.

---

<div class="post-metadata">

**Author:** ![thinus](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/thinus/32/120686_2.png) [@thinus](https://forum.bubble.io/u/thinus)\
**Post date:** [March 7, 2022, 8:04am UTC](https://forum.bubble.io/t/is-it-live-or-is-it-dev/140093/7 "2022-03-07T08:04:54Z")

</div>

This is exactly what I’m doing.  
I created a db yes/not field to let my program know which api to use. Just change one entry instead of changing all the backend workflows.
