Created
November 19, 2021 01:56
-
-
Save loloDawit/cc98339e836921ba44c720fc79b7ebef to your computer and use it in GitHub Desktop.
src/common/config.js
This file contains 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
/* eslint-disable no-undef */ | |
"use strict"; | |
module.exports = (options) => { | |
var config = { | |
method: "post", | |
url: `${process.env.URL}`, | |
headers: { | |
"Content-Type": "application/json", | |
"API-Key": `${process.env.NODE_ENV === "dev" ? process.env.API_KEY : process.env.API_KEY_PROD}` | |
}, | |
data: options | |
}; | |
return config; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment