# Motoko: environment check

**URL:** <https://forum.dfinity.org/t/motoko-environment-check/9282>\
**Category:** Language Support\
**Created:** [December 3, 2021, 9:28am UTC](https://forum.dfinity.org/t/motoko-environment-check/9282 "2021-12-03T09:28:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexeychirkov](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alexeychirkov/32/1991_2.png) [@alexeychirkov](https://forum.dfinity.org/u/alexeychirkov)\
**Post date:** [December 3, 2021, 9:28am UTC](https://forum.dfinity.org/t/motoko-environment-check/9282/1 "2021-12-03T09:28:39Z")

</div>

If there is a way to check if current environment is development or production in motoko code?

Something like we have in node: `process.env.NODE_ENV === "development"`…

@rossberg @claudio

---

<div class="post-metadata">

**Author:** ![nomeata](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nomeata/32/733_2.png) [@nomeata](https://forum.dfinity.org/u/nomeata)\
**Post date:** [December 3, 2021, 9:45am UTC](https://forum.dfinity.org/t/motoko-environment-check/9282/2 "2021-12-03T09:45:29Z")

</div>

No, no such mechanism exists today. Your best bet right now is to have a build script that creates a Motoko file with a boolean or a variant value in it, and then import it from your main program.

---

<div class="post-metadata">

**Author:** ![cyberowl](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cyberowl/32/3635_2.png) [@cyberowl](https://forum.dfinity.org/u/cyberowl)\
**Post date:** [February 11, 2022, 1:53pm UTC](https://forum.dfinity.org/t/motoko-environment-check/9282/3 "2022-02-11T13:53:56Z")

</div>

Hmm I guess one can check the canister Id and then set it that way?
