From 1d4df38337b11d3de554b1b6c0d0d3382ecfef2a Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Fri, 3 May 2013 08:06:12 -0400
Subject: Get rid of Parse.com API keys
Deciding to not completely clear them from history, so don't use them
please.
---
config.js | 5 +++++
public/javascripts/parse-interface.js | 4 ++--
routes/home.js | 18 ++++++++++++------
views/index.ejs | 8 ++++++++
4 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/config.js b/config.js
index 8c417ee..f1b1128 100644
--- a/config.js
+++ b/config.js
@@ -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 @@
+
--
cgit v1.2.3