ARGreat article! For that client/server dependent secret you could use a ternary to further refine it. const isServer = typeof window === “undefined” fetch( ${isServer ? process.env.BASE_URL : “ “}/api/hello ).then...Comment·Article·Feb 7, 2021·Keeping secrets safe with Next.js API routes