I have the following .env.development file:
IP="$(ifconfig en0 | awk '/inet /{print $2}')"
GQL_HOST_HTTP="http://$IP:3030/graphql"
The expectation is that GQL_HOST_HTTP ends up as "http://192.169.0.1:3030/graphql" (depending on my local machine IP, as should be retrived by the command under the $IP variable).
However, the $IP variable gets evaluated as a string, so GQL_HOST_HTTP ends up as http://(ifconfig en0 | awk '/inet /{print '):3030/graphql (the $2) part of IP gets interpreted as a variable, unfortunately).
How do I evaluate the $IP variable? I tried storing the ip as a local system environment variable referencing local environemnt variable, but next.js does not seem to have access to those.