Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
push to github
  • Loading branch information
david-j-davis committed Mar 13, 2017
1 parent 84e3942 commit b39ee60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -13,6 +13,11 @@ Open source projects used:
* Pug
* Bootstrap

Notes
-----------
* When setting up Google Drive CMS, your CMS Configuration 'endpoint' setting should look something like this: ```https://your-app-name.firebaseio.com/posts.json?auth=80alsdkjfaslkLKJDLFKJDLDkjsldkfjss```
* Retrieve your auth secret key inside your Firebase project at Settings (cog icon) > Project Settings > Service Account > Database Secrets

Demo
-----------
[Blog Example]
Expand Down
7 changes: 5 additions & 2 deletions routes/index.js
@@ -1,7 +1,10 @@
var express = require('express');
var router = express.Router();
const FirebaseREST = require('firebase-rest').default;
var jsonClient = new FirebaseREST.JSONClient('https://node-heroku-blog.firebaseio.com/', { auth: '8OicTSxmbUQ0Da7wdWTN9dkJZDZOp3G865U6LxkH' });
//Replace the app name variable below with your firebase database url
var firebaseDBuri = '';
var firebaseDBsecret = '';
var jsonClient = new FirebaseREST.JSONClient(firebaseDBuri, { auth: firebaseDBsecret });

var blogData;
//retreive blog data on homepage, pass it to variable
Expand All @@ -16,7 +19,7 @@ router.get('/', function (req, res, next) {
},function(req, res) {
//console.log(req.identifier);
//console.log(req.somedata);
res.render('index', { title: 'Example Blog Using Google Drive CMS, Firebase, and a node/express backend', name: 'David Davis', posts: blogData});
res.render('index', { title: 'Example Blog Using Google Drive CMS, Firebase, and a node/express backend', name: 'Your Name', posts: blogData});
});

module.exports = router;

0 comments on commit b39ee60

Please sign in to comment.