aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--env.ts4
-rw-r--r--index.ts1
-rw-r--r--package-lock.json5
-rw-r--r--package.json1
4 files changed, 11 insertions, 0 deletions
diff --git a/env.ts b/env.ts
new file mode 100644
index 0000000..60874cc
--- /dev/null
+++ b/env.ts
@@ -0,0 +1,4 @@
+import { config } from 'dotenv';
+
+const { parsed } = config();
+export default parsed;
diff --git a/index.ts b/index.ts
index 9ba0431..e2146cd 100644
--- a/index.ts
+++ b/index.ts
@@ -1,5 +1,6 @@
import mongoose from 'mongoose';
import Promise from 'bluebird';
+import './env';
import app from './app';
mongoose.Promise = Promise;
diff --git a/package-lock.json b/package-lock.json
index 5818324..fd0ec8d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -957,6 +957,11 @@
"esutils": "^2.0.2"
}
},
+ "dotenv": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
+ "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
+ },
"ecdsa-sig-formatter": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
diff --git a/package.json b/package.json
index 786bba1..5292bff 100644
--- a/package.json
+++ b/package.json
@@ -35,6 +35,7 @@
"bluebird": "^3.7.2",
"cors": "^2.8.5",
"debug": "^4.1.1",
+ "dotenv": "^8.2.0",
"feathers-hooks-common": "^5.0.3",
"feathers-mongoose": "^8.3.0",
"lodash": "^4.17.15",