diff options
| author | Teddy Wing | 2013-05-03 08:06:12 -0400 |
|---|---|---|
| committer | Teddy Wing | 2013-05-03 08:06:12 -0400 |
| commit | 1d4df38337b11d3de554b1b6c0d0d3382ecfef2a (patch) | |
| tree | 2b545b1909b59badcfd48c0bca4ec20b1375c2ee | |
| parent | f61952a5e5afd4a7f54b669d315474b267268317 (diff) | |
| download | Who-am-I-1d4df38337b11d3de554b1b6c0d0d3382ecfef2a.tar.bz2 | |
Get rid of Parse.com API keys
Deciding to not completely clear them from history, so don't use them
please.
| -rw-r--r-- | config.js | 5 | ||||
| -rw-r--r-- | public/javascripts/parse-interface.js | 4 | ||||
| -rw-r--r-- | routes/home.js | 18 | ||||
| -rw-r--r-- | views/index.ejs | 8 |
4 files changed, 27 insertions, 8 deletions
@@ -5,4 +5,9 @@ config.tms = { key: process.env.TMS_API_KEY }; +config.parse = { + application_id: process.env.PARSE_COM_APPLICATION_ID, + javascript_key: process.env.PARSE_COM_JAVASCRIPT_KEY +}; + module.exports = config;
\ No newline at end of file diff --git a/public/javascripts/parse-interface.js b/public/javascripts/parse-interface.js index 717f059..04fce9a 100644 --- a/public/javascripts/parse-interface.js +++ b/public/javascripts/parse-interface.js @@ -2,8 +2,8 @@ var ParseInterface = ParseInterface || null; (function() { var cParseInterface = function() { - var application_id = '6jaGjImHFtbJLkAWJRnnLTHfD01nmWHAIrAKNYge'; - var javascript_key = 'zA6og358R2Wg5NVAHWj81zeFz2WQZ5u2AhHFPCjN'; + var application_id = Config.parse.application_id; + var javascript_key = Config.parse.javascript_key; Parse.initialize(application_id, javascript_key); var ContestObject = Parse.Object.extend('ContestObject'); diff --git a/routes/home.js b/routes/home.js index 2c1be44..62b1f6c 100644 --- a/routes/home.js +++ b/routes/home.js @@ -1,8 +1,14 @@ +var config = require('../config'); -/* - * GET home page. - */ - -module.exports = function(req, res){ - res.render('index'); +module.exports = function(req, res) { + var data = { + config: { + parse: { + application_id: config.parse.application_id, + javascript_key: config.parse.javascript_key + } + } + }; + + res.render('index', data); };
\ No newline at end of file diff --git a/views/index.ejs b/views/index.ejs index 2a26772..94be59d 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -44,6 +44,14 @@ </div> </footer> + <script> + var Config = { + parse: { + application_id: '<%= config.parse.application_id %>', + javascript_key: '<%= config.parse.javascript_key %>' + } + }; + </script> <script src="/javascripts/app.js"></script> <script src="/javascripts/parse-interface.js"></script> <script src="/javascripts/viggle.js"></script> |
