aboutsummaryrefslogtreecommitdiffhomepage
path: root/api/config.js
diff options
context:
space:
mode:
Diffstat (limited to 'api/config.js')
-rw-r--r--api/config.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/api/config.js b/api/config.js
new file mode 100644
index 0000000..ff9644f
--- /dev/null
+++ b/api/config.js
@@ -0,0 +1,26 @@
+const process = require('process')
+require('dotenv/config')
+
+const PORT = process.env.PORT || 8080
+const ENABLE_DEV_SERVER = process.env.ENABLE_DEV_SERVER
+const ENABLE_GITHUB = process.env.ENABLE_GITHUB
+const GITHUB_APP_NAME = process.env.GITHUB_APP_NAME
+const GITHUB_APP_PRIVATE_KEY = process.env.GITHUB_APP_PRIVATE_KEY
+const GITHUB_APP_ID = process.env.GITHUB_APP_ID
+const GITHUB_CLIENT_ID = process.env.GITHUB_CLIENT_ID
+const GITHUB_CLIENT_SECRET = process.env.GITHUB_CLIENT_SECRET
+const GITHUB_OAUTH_CALLBACK_URL = process.env.GITHUB_OAUTH_CALLBACK_URL
+const APP_BASE_URL = process.env.APP_BASE_URL
+
+module.exports = {
+ PORT,
+ ENABLE_DEV_SERVER,
+ ENABLE_GITHUB,
+ GITHUB_APP_NAME,
+ GITHUB_APP_PRIVATE_KEY,
+ GITHUB_APP_ID,
+ GITHUB_CLIENT_ID,
+ GITHUB_CLIENT_SECRET,
+ GITHUB_OAUTH_CALLBACK_URL,
+ APP_BASE_URL
+}