Over the past couple of days I've made more progress on the Node project I started. If you haven't read the first article, click that previous link for the background. Here's what I've been able to do since my first post.
The only oddity I ran into was that even though I set the From to be your name and email address, when it shows up in Gmail it is always my email address. I'm assuming that is a Gmail security thing. If anyone knows better, let me know. Since I include the sender's email address anyway this isn't a deal breaker for me.
MongoDBI tell ya what. I never want to write SQL again. This isn't the first time I used Mongo but my god - what a pleasure. Here are a few examples.
I think that $or search is the one I like the most.
TemplatingI hate the Jade templating system and EJS is ok, but my favorite templating system is Handlebars. The HBS module gives me access to that inside my views. I can even extend it with my own utility functions. Here is one sample view:
Yeah, Disqus. Done.
I love AppFog. How much do I love AppFog? AppFog is this:
Let me describe what their process was like for me.
- I signed up.
- I made a new app.
- I clicked about 2 buttons to add Mongo support.
- I installed the command line tool via npm.
That's it. I was done. Period. And it worked! Now it turns out I was supposed to modify one line: app.listen(3000) needed to change to app.listen(process.env.VCAP_APP_PORT || 3000). But even before I did that it worked. Heck, I didn't even have to tweak Mongo.
So now my process is - I make some changes - I commit to GitHub - I push up to AppFog. The update process for AppFog takes about 20 seconds.
I'm so happy with them that I'm going to go ahead and take the plunge and spend the 20 bucks a month. (Although I'll probably end up putting an AdSense ad on the site to help pay for it.)
Looks great! Have you considered using gists for the code samples on the site rather than pre/code blocks?
I haven't experimented with node at all, so I'm not really familiar with the project structure. Is this using any sort of MVC framework?
Gists would be nice (I use it here), but I'm going to hold off for now.
Node by itself doesn't do much. Node+Express is where the magic lies. :) Check out expressjs.com.
Thanks, Ray. Looks like I have something new to play with this weekend. :)
Hey Ray, the dates on the entries on the JS Cookbook appear to be one month off... nice work, btw!
Sean, check it out - I added Prism (http://prismjs.com/index.html) for code coloring. *Very* lightweight.