node package manager

bluefish

Bluefish Logo

Fast, simple, minimalist content management framework for node.

Npm Version Npm Downloads Build Status Code Climate Test Coverage

Installation

npm install bluefish --save
var bluefish = require("bluefish");
var cms = bluefish({
  express: {
    port: 8080
  }
});
 
cms.content.getData().then(function(content){
  console.log( content );
});

Features

  • Super easy Content System.
  • Fast Routing ( Backend By Express )
  • Simple configuration ( You don't have to do anything )
  • Out of the box Simple Module system
  • Memory Cache

Docs

Access your content

  curl http://127.0.0.1:8080/api/users

Or

 
const CMS = require('bluefish')({ /* ... */ })
  cms.content.getData("model").then(function(content){
    //content 
  });
 

Config documentation

"use strict";
const WaterlineMemory = require("sails-memory");
let cms = require("bluefish")({
    database: {
      migrate: "safe",
 
      adapters: {
          "memory": WaterlineMemory
      },
      connections: {
        default: {
          adapter: "memory"
        }
      }
 
    },
 
    express: {
      port: 9000,
      host: "localhost",
 
      content: [
        "/path"
      ]
    },
 
    api: {
      baseRoute: "/something"
    },
 
    env: "development",
 
    production: {
      express: {
        port: 80
      }
    },
 
    development: {
      //this will override any 'defaults' if the `env` is 'development' 
    },
 
    models: {
      something: {
        singleton: true,
        definition: {
          name: {
            type: String
          }
        }
      }
    },
    modules: [
      //modules... readme coming soon! 
    ]
});

API Docs

Roadmap

Examples

To view the examples, clone the Bluefish repo and install the dependencies:

  $ git clone https://bitbucket.solnet.co.nz/scm/bluef/bluefish.git --depth 1
  $ cd bluefish
  $ npm install

Then run whichever example you want:

  $ node examples/hello-world

tests

  $ npm install
  $ npm test

Prerequisites

Contributing

Contributing is awesome!

Please ensure your contributions come with tests.

License

GNU License Please read our License file in the repository.