BeanJS is a full stack open source framework for using SQL with Node. BeanJS is build on the very powerful Bookshelf.js. Inspired by the superb MeanJS.

MeanJS is a great project and thoroughly recommended, however using a NoSQL solution isn't always the best option which is where this framework comes in.

BeanJS is extremely lightweight and ideal for getting small projects off the ground quickly without all the initial baggage found in other frameworks.

It uses the powerful Knex query builder so you don't to worry about configuring your database schema manually! The Knex migration tools will take care of all this for you through the Yo generator, however at present this is still in development.

Before You Begin

Read about the building blocks for the BeanJS application:


Make sure you have installed all these prerequisites on your development machine.

$ npm install -g bower
$ sudo npm install -g grunt-cli
$ sudo npm install -g knex

Quick Install

The first thing you should do is install the Node.js dependencies. The boilerplate comes pre-bundled with a package.json file that contains the list of modules you need to start your application, to learn more about the modules installed visit the NPM & Package.json section.

To install Node.js dependencies you're going to use npm again, in the application folder run this in the command-line:

$ npm install

Configure your DB engine

BeanJS is relational database agnostic but there is a couple off steps that needs to be done for your particular Database Engine:

First Edit your config files in /app/config/env (development.js,production.js and test.js needs to be edited).

Finally use Knex to generate the example module.

$ knex migrate:latest

Running Your Application

After the install process is over, you'll be able to run your application using Grunt, just run grunt default task:

$ grunt

Your application should run on the 3000 port so in your browser just go to http://localhost:3000


This project is still fairly early in development so we're always looking for contributions!