converted to environment variables and changed and deleted API key.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
.env
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
Generated
+13
@@ -13,6 +13,7 @@
|
||||
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
||||
"@fortawesome/react-fontawesome": "^0.2.2",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.4.7",
|
||||
"express": "^4.21.2",
|
||||
"postmark": "^4.0.5",
|
||||
"react": "^18.2.0",
|
||||
@@ -1192,6 +1193,18 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "16.4.7",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
|
||||
"integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://dotenvx.com"
|
||||
}
|
||||
},
|
||||
"node_modules/dunder-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||
|
||||
+3
-1
@@ -5,6 +5,7 @@
|
||||
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
||||
"@fortawesome/react-fontawesome": "^0.2.2",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.4.7",
|
||||
"express": "^4.21.2",
|
||||
"postmark": "^4.0.5",
|
||||
"react": "^18.2.0",
|
||||
@@ -24,5 +25,6 @@
|
||||
"build": "vite build",
|
||||
"dev": "vite --host",
|
||||
"start": "vite --host"
|
||||
}
|
||||
},
|
||||
"type": "module"
|
||||
}
|
||||
|
||||
+5
-3
@@ -1,11 +1,13 @@
|
||||
import express from "express";
|
||||
import cors from "cors";
|
||||
import postmark from "postmark";
|
||||
import * as dotenv from 'dotenv';
|
||||
dotenv.config();
|
||||
|
||||
const app = express();
|
||||
const port = 3001; // Example port
|
||||
const client = new postmark.ServerClient(
|
||||
"d15a4575-17f1-4ead-8e53-69eb2faea982",
|
||||
);
|
||||
const apiKey = process.env.API_KEY;
|
||||
const client = new postmark.ServerClient(apiKey);
|
||||
|
||||
app.use(cors());
|
||||
app.use(express.json()); // Parse incoming JSON data
|
||||
|
||||
Reference in New Issue
Block a user