Blog for win


Do you want great profits? Make a blog! But how?? Magic.

var redis = require('redis').createClient();
var blog = require('derp');
blog.redis = redis;

There's your blog. Write a post dufas.{
  id: 'best-post-ever',
  title: "my life",
  markdown: "makin' *mad stacks* bitches. markdown up in hurr",
  tags: ["gangsta life", "chillin"],
  published: new Date()
}, function (error) { ... });

Wtf do we do with that id?

blog.get('best-post-ever', function (errorpost) {
  // lol, post.content is HTML, not markdown 
  // how great is that 

All done! Oh snap, forgot to make a home page.{page: 1, perPage: 10}, function (errorposts) {

Regret that post? No problem.

blog.remove('best-post-ever', function (error) { ... });

BTW, your blog should maximize SEO:{page: 1, perPage: 10, tag: "gangsta life"}, function (errorposts) {
blog.tags(function (errortags) {
  // tags[0].tag 
  // tags[0].count 

Feeling special yet? Go make a blog you idiot!

  • tags() method
  • Markdown in titles ?
  • Archive lists by year, month, day (doc)
  • Option for listing published/non-published (doc)