gnome - A Simple Embeddable Node.js Blog Framework Built on Express.js and MongoDB
How To Install
You can easily drop gnome
into your project through the package manager.
$ npm install gnome
How To Use
Server Side
You can easily integrate gnome
into your express.js
project.
// Set up expressvar express = ;var app = ; // Set up server homepageapp; // Import gnomevar gnome = ; // Send in the express appgnome; // Send in the mongodb urignome; // Initialize the blog apignome; // Listenapp;console;
Client Side
There is a client side js file that can be called via HTML. (It is dependent on jQuery)
There are several jQuery extensions now availible.
// Create a postvar post = title: "How To Use Node.js" author: "NodeNinja" body: "BLAHBLAHBLAH" tags: 'tutorials''nodejs''projects' ; // Publish the post$; // Get all posts in a JSON objectvar history = $; // Get a single post by id (unique object id)var singlepost = $;
About MongoDB Configuration
gnome
stores your blog posts in MongoDB, within a collection called gnomeblog