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
-
node
-
npm
-
gulp
-
slush
$ npm install -g slush
$ npm install -g slush-marklogic-node
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
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
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.