Last active
July 7, 2019 15:37
-
-
Save jacobedawson/611f48526accf9ea57ee2c6dada76e80 to your computer and use it in GitHub Desktop.
Next Config for Environment Variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the next.config.js file in your root dir | |
module.exports = { | |
env: { | |
API: | |
process.env.NODE_ENV === "production" | |
? process.env.API_URL | |
: "http://localhost:8080/api" | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment