From 448b0061945b65dc36c08eaf6752060600d5895d Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 20 Mar 2017 01:39:09 +0800 Subject: Update to generate front-end constants on server startup To avoid extra webpacking on changing configs and follow the 12 factor app --- public/js/lib/common/constant.ejs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 public/js/lib/common/constant.ejs (limited to 'public/js/lib/common/constant.ejs') 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 -- cgit v1.2.3