I want to be able to capture the "host variable" of my project - the bit that says "mlocal" when I'm running the project locally, or mstage/m/user1234 when on the Moovweb cloud.
The variable $host contains the full URL of the site, so I can't use that. I want to be able to grab the first bit of the URL (example: mlocal.site.com - I want to grab "mlocal") and set it in a new variable.
I'm trying like so:
var("host") {
$my_var = capture(/^\w+/)
}
But it doesn't seem to work.