A question:
I’ve made a branch specific for Heroku. In github you don’t need to see the config file where i have the username and password credentials. But Heroku in order to run the live app will need that file.
So that’s why i made a Heroku branch. I was just following the tutorial and as some of you might’ve thought: Yes, the branch is on github all the same with the username and password to my mongodb mlab database, just not in the master branch. So I have to ask how could I have it done in such a way that i could’ve kept my credentials private?
To keep your credentials private, you could use environment variables. You can set those (somewhere) on Heroku and then use the dotenv npm package for developing.
@BenGitter
As sugested I used enviromnent variables, and while dotenv seemed attractive for something of this small scale i just limited to simply add the var locally with an export command in Cloud 9 and in Heroku i just added the enviromnent var in the dashboard and that was it – but i’ll definitely keep it in mind for the future, i had actually seen dotenv before in github repos and sort of glanced through it in confusion. At the time:i was more concerned with looking for a specific code
@jenovs
did you use Heroku CLI to add an enviromental variable to heroku? If so, did you install it on Cloud 9?
I just noticed in your app’s page, you have a text problem (I’m using Firefox, and the 2nd code paragraph seems to have overlapping text? It’s very odd), but i like your approach by example way of introducing the app.
@jboxman
Looks pretty good. So why did you use Redis?
Because it felt right @St3ps. I didn’t want to pay the setup cost for MongoDB. I’d want to learn Mongoose along with it, which I ultimately will at some point. Plus Redis seemed ideal for this application. In my implementation, I don’t care about duplicate entries, so it’s basically just a running log of every URL/key pair ever added. Anytime a valid URL is added, it also is recorded in a top N list. Redis is un-opinionated in how you use it and it is packed with operators for each data structure.
Glad my tutorial helped you out. I have learned a lot since that time and was actually currently working on a revision to that tutorial to clean things up a bit.
As you pointed out, my host seems to have disappeared off the face of the planet as of yesterday.
Working on rebooting my site now. And just last week I was thinking about making backups…