You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where isProduction() is a function that "detects the stage" (prod || dev) by reading it directly or reading the app name (site-prod-php || site-dev-php) or some other serverless value.
TL;DR:
What values can I read in php, if any, from the serverless environment?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'd like to be able to detect stage (
prod
||dev
) in my php code.serverless.yaml
available to read in php code?Example
For instance, if I want the css served in my production env to be minified:
Where
isProduction()
is a function that "detects the stage" (prod
||dev
) by reading it directly or reading the app name (site-prod-php
||site-dev-php
) or some other serverless value.TL;DR:
What values can I read in php, if any, from the serverless environment?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions