I would like to set up a simple expression in my gatsby-config.js that determines whether I am working locally or in production so that I can set the siteUrl<
gatsby-config.js
siteUrl<
Yes you can, by setting up environment variables.
Create some .env.* files in root folder for different environments.
.env.*
Docs here: https://www.gatsbyjs.org/docs/environment-variables/