Parse - NodeJS - Heroku


I was working on Agenda Digital Honduras, a social event platform. People can view coming events in Honduras, get some info like description, date, hour, place, and detailed url.

I love working with Parse, for me it's the best backend solution. I don't like the idea of sharing the App id or Client Id, so that's why I never thought on using Parse JS SDK. So I always ended up using Parse PHP.  I was playing with NodeJS (cool stuff) and saw that I can implement Parse JS SDK, my life changed again. 

npm install parse

The App Id and Client ID, are protected now. I decided to give a try to NodeJS for this project. As a human being, I decided not to use a Node framework. So I ended up using this dependencies:

var url = require('url');
var http = require('http');
var fs = require('fs');
var replace = require("replace");
var Parse = require('parse').Parse; 

I worked on a small framework after all. At the begging of the home page we find:


I specified the class name that Parse will search. So, I say %search:User% if I want to search for the users. A cool trick I implemented that was the URL search. If you go to a page with %search:Event% it will search all the events. You can specify to only search 1 event by the url 

To retrieve the data of an object, I tell to node where I want to display the info. %name% will show me the name of the object.

<div class="thumbnail">
 <img src="%Event:banner:image%" />
 <div class="caption">
 <p class="descriptionText">%Event:description%</p> 
<p><a href="event/%Event:id%" class="btn btn-primary" role="button">View</a>