summaryrefslogtreecommitdiff
path: root/public/js/lib/common
diff options
context:
space:
mode:
authorWu Cheng-Han2017-03-20 01:39:09 +0800
committerWu Cheng-Han2017-03-20 01:39:09 +0800
commit448b0061945b65dc36c08eaf6752060600d5895d (patch)
tree9b7dee9a9617518404f5a02a014f535f59ac24e6 /public/js/lib/common
parentb07eeed0c5a3c8de28e27326967cea592071ca6a (diff)
Update to generate front-end constants on server startup
To avoid extra webpacking on changing configs and follow the 12 factor app
Diffstat (limited to 'public/js/lib/common')
-rw-r--r--public/js/lib/common/constant.ejs8
1 files changed, 8 insertions, 0 deletions
diff --git a/public/js/lib/common/constant.ejs b/public/js/lib/common/constant.ejs
new file mode 100644
index 00000000..e4a1cf0a
--- /dev/null
+++ b/public/js/lib/common/constant.ejs
@@ -0,0 +1,8 @@
+window.domain = '<%- domain %>'
+window.urlpath = '<%- urlpath %>'
+window.debug = <%- debug %>
+window.version = '<%- version %>'
+
+window.GOOGLE_API_KEY = '<%- GOOGLE_API_KEY %>'
+window.GOOGLE_CLIENT_ID = '<%- GOOGLE_CLIENT_ID %>'
+window.DROPBOX_APP_KEY = '<%- DROPBOX_APP_KEY %>' \ No newline at end of file