added .env

This commit is contained in:
2024-03-20 19:39:35 -05:00
parent a30c4bc587
commit 2606b59a8c
2 changed files with 6 additions and 5 deletions

1
api/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.env

View File

@@ -7,11 +7,11 @@ app.use(cors());
app.use(express.json()); app.use(express.json());
const fetchToken = async () => { const fetchToken = async () => {
const clientID = "TylerPul-ebayimpo-PRD-a983027cf-9b6b8bba"; // Replace with your eBay App ID (Client ID) const ebayClientId = process.env.EBAY_CLIENT_ID; // Replace with your eBay App ID (Client ID)
const clientSecret = "PRD-983027cfae51-634b-42bb-ae58-d68c"; // Replace with your eBay Cert ID (Client Secret) const ebayClientSecret = process.env.EBAY_CLIENT_SECRET; // Replace with your eBay Cert ID (Client Secret)
const credentials = Buffer.from(`${clientID}:${clientSecret}`).toString( const credentials = Buffer.from(
"base64" `${ebayClientId}:${ebayClientSecret}`
); ).toString("base64");
try { try {
const response = await fetch( const response = await fetch(