node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org ยป

ramen

Ramen

Note: this is experimental software and is subject to change

Ramen is a RESTful service that acts as a data store for a blogging platform. It uses MongoDB for data storage. Running the service looks like this:

var ramen = require( 'ramen' );

var app = ramen.createServer({
    "port": 4050,
    "mongo": "mongodb://localhost:27017/ramen",
    "salt": "no one will ever guess this..."
});

app.start();

Installation

sudo npm install ramen

Note: I'm actively trying to make stuff work, but there may be some problems with the package at this time. This is my first open source project, so try and give me a break!

Configuration

createServer takes an options object, and all three of these fields are required:

  • port: the port that the service should listen on
  • mongo: the MongoDB URL string
  • salt: a random salt to be used in password hashing

Bootstrapping

At this time I have not developed an admin interface to Ramen, though that is a goal for the near future. For now, I have a couple of simple utilities for manually manipulating blog data.

You'll need to clone the repo and update dependencies:

git clone git://github.com/apeace/ramen.git
cd ramen
sudo npm update

Next, create a file ramen.conf that looks like this:

{
    "mongo": "mongodb://localhost:27017/ramen",
    "salt": "no one will ever guess this..."
}

Then you can use this utility to create a user and a blog:

node util/newblog.js /path/to/conf.js
Blog title: My Blog
Blog user: user
Blog password: password
You sure? y
Done
Blog ID: 4e90d8b9a78a2aba3a000001

You will need that Blog ID as well as the username and password you chose in order to use Rblog, the module that turns a Ramen blog into a web site.

You can use the import utility to create or update blog objects, like Tags and Posts. You will need a configuration file that points to your Ramen instance, like this:

{
    "port": 4050,
    "blog" : "4e90d8b9a78a2aba3a000001",
    "user" : "user",
    "password" : "password"
}

Then you will need your data in another JSON file. For example, a Tag:

{
    "title" : "My Tag",
    "url" : "my-tag"
}

With those two files in place, do this:

node util/import.js tag /path/to/conf.json /path/to/data.json

Where tag is the data type you are importing. The utility will add the object ID and created/updated timestamps to your JSON file. If you want to change the data, just change the JSON file and run the same command again.

Moving Forward

This is just the beginning of Ramen. If Ramen were a human, she would have been born yesterday. I'm hoping to have her riding a tricycle within a few weeks.

I have a few specific plans, a few rough ideas, and plenty of room for creativity. Watch the issues (or submit some) for a rough roadmap.

License

Copyright (c) 2011 Andrew Peace

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.