cm-engine

0.2.2 • Public • Published

CM-Engine

The Content Management Engine for Enginemill.

Installation

CM-Engine is designed to be installed by including it in the package.json dependencies list for your web project. Follow the npm documentation for package.json if you don't already know how to do that.

Once you have it listed in the package.json for your project, just run

npm install

from the root of your project.

Usage

Load CM-Engine into a Node.js module by requiring it.

    var CME = require('cm-engine');

Configure and create a handler function and then simply pass it to one of your Enginemill endpoint definitions.

var cmHandler = CME.createHandler({
  template_path: '/path/to/templates'
, content_path: '/path/to/content'
, createContext: function () {
        return {
                env: 'local'
            , cdn: 'http://cdn.example.com'
        };
  }
});
 
EM.endpoint({
        name: 'Blog'
    , route: '/blog/*'
    , methods: 'HEAD GET'
    , handler: cmHandler
});

Copyright and License

Copyright: (c) 2012 by The Fireworks Project (http://www.fireworksproject.com)

Unless otherwise indicated, all source code is licensed under the MIT license. See MIT-LICENSE for details.

Readme

Keywords

none

Package Sidebar

Install

npm i cm-engine

Weekly Downloads

1

Version

0.2.2

License

none

Last publish

Collaborators

  • kixxauth