Skip to content

Instantly share code, notes, and snippets.

@jacobedawson
Last active July 7, 2019 15:37
Show Gist options
  • Save jacobedawson/611f48526accf9ea57ee2c6dada76e80 to your computer and use it in GitHub Desktop.
Save jacobedawson/611f48526accf9ea57ee2c6dada76e80 to your computer and use it in GitHub Desktop.
Next Config for Environment Variables
// 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