Q:

How to check development mode in OctoberCMS? 

I've got a .env file with this content: 

APP_ENV=dev  

in the root of my project which shows that I am in the development mode 
and therefor my config files will be loaded from config/dev directory instead of config directory.   
Now I want to add live reload to my html page by including the following script:
<script type="text/javascript">document.write('<script src="//localhost:35729/livereload.js?snipver=1" type="text/javascript"><\/script>')</script>

But I only want this to be included if I am in development mode, not in production.  How can I do this? 

A:

As luketowers answered on October's Slack channel:

https://octobercms.com/docs/markup/this-environment
So for your example you’d do something like this:
{% if this.environment == 'dev' %}
    <script src="//localhost:35729/livereload.js?snipver=1" type="text/javascript"></script>
{% endif %}

