patrickmcelwee / slush-marklogic-node

Slush generator for a MarkLogic/node project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MarkLogic-Node Generator

This is a Slush generator that produces a skeleton application with the following components:

  • AngularJS
  • Gulp
  • node.js: very thin layer, hosting the Angular code and proxying MarkLogic REST API requests
  • Roxy Deployer: bootstrap MarkLogic databases, application servers, etc; scaffolding for MarkLogic REST API service extensions

Use

Required

  • node

  • npm

  • gulp

  • slush

    $ npm install -g slush

Install the generator

$ npm install -g slush-marklogic-node

Run the generator

Go to the directory where your new project will be created (the parent). Then:

$ slush marklogic-node <app-name>

When the generator is finished, start up your application by:

  • $ cd {app-name}
  • edit deploy/build.properties; set the -port properties to available ports (defaults: 8040, 8041)
  • $ ./ml local bootstrap
  • $ ./ml local deploy modules
  • edit gulp.config.js to set your desired ports
  • $ gulp serve-dev# this will watch the .less file for changes and compile them to .css

Data

Sample Data

The application comes with 25 JSON documents generated by json-generator.com. You can load them with MLCP like this:

$ ./ml local mlcp import -input_file_path sample-data -document_type json

General Data Information

The application assumes that you're storing JSON data. This shows up in the default format request for the MLRest service's searchContext, the detailController's (detail-ctrl.js) request to get a document, and in the out-of-the-box detail view.

About

Slush generator for a MarkLogic/node project

License:Other


Languages

Language:JavaScript 48.5%Language:XQuery 26.3%Language:HTML 16.4%Language:XSLT 6.7%Language:CSS 2.1%