HI Geert,Thanks for your tip. As per the link below, I am using ML8 and i did choose the dev brand while initialized the slush framework.But still I am not able to deploy modules using ./ml. I got an error ""ERROR: 404 "Not Found"ERROR:"" I tried changing the version in deploy/build.properties to 8 but the error is same.Are you aware of any other issue?I am attaching my terminal output. Your inputs would be helpful.regards,Puneet P.S. there were some errors on "No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'." during the slush initialization which I ignored. From: [email protected] To: [email protected] Date: Thu, 30 Apr 2015 09:22:54 +0000 Subject: Re: [MarkLogic Dev General] Deploy a javascript application
Hi Puneet, We are very close to a new release for both Roxy and the slush template, but not there yet. If you proceed with installing slush-marklogic-node, I’d suggest following these hints for the moment: https://github.com/marklogic/slush-marklogic-node/issues/68 Cheers, Geert From: Puneet Makwana <[email protected]> Reply-To: MarkLogic Developer Discussion <[email protected]> Date: Thursday, April 30, 2015 at 11:02 AM To: MarkLogic Developer Discussion <[email protected]> Subject: Re: [MarkLogic Dev General] Deploy a javascript application Thanks Geert, David. Your inputs are helpful, I would choose thin node.js with roxy approach. Regards, Puneet --- Original Message --- From: "Geert Josten" <[email protected]> Sent: April 30, 2015 5:06 PM To: "MarkLogic Developer Discussion" <[email protected]> Subject: Re: [MarkLogic Dev General] Deploy a javascript application Hi Puneet, If you are looking at using AngularJS for front-end, you don’t need to use NodeJS as middle-tier at all. You could potentially serve the AngularJS files as static files from MarkLogic itself, or serve them from any other web container you can think of. I have seen cases where AngularJS was served from a Java-tier using Jetty and Tomcat. Regarding separate web/app server: if you push your static files inside the REST-api modules database, you will have to use app-level authentication, otherwise you won’t be able to even show a simple login screen. Unless you would be happy to use the old fashion HTTP auth dialog from the browser. There are two reference project that both use AngularJS as front-end, and MarkLogic REST-api as back-end. I suggest taking a look at these: Samplestack: https://github.com/marklogic/marklogic-samplestack, mostly Java-oriented, and uses Gradle for deploymentSlush-marklogic-node: https://github.com/marklogic/slush-marklogic-node, no Java, thin NodeJs middle-tier, and uses Roxy (https://github.com/marklogic/roxy) for deployment Samplestack is meant as a show case app. The slush template is intended as a skeleton to quickly ramp up new projects. There are other examples out there as well, like this World Match demo https://github.com/jojrg/wm14, which uses Java and Spring Boot, and Jquery, though fitting in AngularJS wouldn’t be difficult.. Kind regards, Geert From: Yinyan guy <[email protected]> Reply-To: MarkLogic Developer Discussion <[email protected]> Date: Thursday, April 30, 2015 at 8:51 AM To: "[email protected]" <[email protected]> Subject: [MarkLogic Dev General] Deploy a javascript application Hi All, I have basic question on deployment of a simple application. I am planning to write the application using angularJS and wanted to know what is the best option for the deployment of this application. I have following questions 1. is it mandatory to use node.js for the mid tier? 2. Can I deploy the Angular.JS application which would use REST APIs using the Marklogic HTTP server? 3. is a separate web/app server the best option? Thank You. regards, Puneet _______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
pmakwana-macbookair:MyWork pmakwana$ slush [slush] Installed generators [slush] âââ marklogic-node (0.1.1) pmakwana-macbookair:MyWork pmakwana$ slush marklogic-node AppFirst [slush] Using slushfile /usr/local/lib/node_modules/slush-marklogic-node/slushfile.js [21:25:37] Starting 'marklogic-node:default'... [?] Name for the app? AppFirst [?] Roxy App Type? rest [?] Roxy Branch? dev Retrieving Roxy script Got Roxy script chmod done; appName=appfirst; appType=rest; branch=dev Spawning Roxy new command: ml new appfirst --app-type=rest --server-version=7 --branch=dev Creating new Application: appfirst... No initial source code is provided for REST apps. You can copy code from Application Builder under the source directory. done done running ml new Configuring Roxy npm WARN package.json [email protected] No repository field. bower not-cached git://github.com/Goldark/ng-json-explorer.git#* bower resolve git://github.com/Goldark/ng-json-explorer.git#* bower cached git://github.com/angular/bower-angular.git#1.2.14 bower validate 1.2.14 against git://github.com/angular/bower-angular.git#1.2.14 bower cached git://github.com/FortAwesome/Font-Awesome.git#4.0.3 bower validate 4.0.3 against git://github.com/FortAwesome/Font-Awesome.git#~4.0.0 bower cached git://github.com/ckeditor/ckeditor-releases.git#4.3.3 bower validate 4.3.3 against git://github.com/ckeditor/ckeditor-releases.git#4.3.3 bower cached git://github.com/marklogic/mlFacets.git#0.0.4 bower validate 0.0.4 against git://github.com/marklogic/mlFacets.git#0.0.4 bower cached git://github.com/twbs/bootstrap.git#3.0.3 bower validate 3.0.3 against git://github.com/twbs/bootstrap.git#~3.0.0 bower cached git://github.com/angular/bower-angular-route.git#1.2.14 bower validate 1.2.14 against git://github.com/angular/bower-angular-route.git#1.2.14 bower cached git://github.com/jquery/jquery.git#2.0.3 bower validate 2.0.3 against git://github.com/jquery/jquery.git#~2.0.3 bower cached git://github.com/pc035860/angular-highlightjs.git#0.3.0 bower validate 0.3.0 against git://github.com/pc035860/angular-highlightjs.git#0.3.0 bower cached git://github.com/esvit/ng-ckeditor.git#0.2.1 bower validate 0.2.1 against git://github.com/esvit/ng-ckeditor.git#* bower cached git://github.com/angular-ui/bootstrap-bower.git#0.11.2 bower validate 0.11.2 against git://github.com/angular-ui/bootstrap-bower.git#~0.11.0 bower cached git://github.com/components/highlightjs.git#8.0.0 bower validate 8.0.0 against git://github.com/components/highlightjs.git#8.0.0 bower cached git://github.com/angular/bower-angular-cookies.git#1.2.14 bower validate 1.2.14 against git://github.com/angular/bower-angular-cookies.git#1.2.14 bower cached git://github.com/angular/bower-angular-mocks.git#1.2.14 bower validate 1.2.14 against git://github.com/angular/bower-angular-mocks.git#1.2.14 bower cached git://github.com/angular/bower-angular-scenario.git#1.2.14 bower validate 1.2.14 against git://github.com/angular/bower-angular-scenario.git#1.2.14 npm WARN engine [email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.2","npm":"2.7.4"}) bower checkout ng-json-explorer#master bower cached git://github.com/jquery/jquery.git#2.0.3 bower validate 2.0.3 against git://github.com/jquery/jquery.git#>= 1.9.0 bower new version for git://github.com/jquery/jquery.git#>= 1.9.0 bower resolve git://github.com/jquery/jquery.git#>= 1.9.0 bower download https://github.com/jquery/jquery/archive/2.1.4.tar.gz bower resolved git://github.com/Goldark/ng-json-explorer.git#8c2a0f9104 bower cached git://github.com/angular/bower-angular.git#1.2.28 bower validate 1.2.28 against git://github.com/angular/bower-angular.git#~1.2.20 bower extract jquery#>= 1.9.0 archive.tar.gz bower resolved git://github.com/jquery/jquery.git#2.1.4 bower extra-resolution Unnecessary resolution: angular#1.2.14 bower install ckeditor#4.3.3 bower install mlFacets#0.0.4 bower install font-awesome#4.0.3 bower install angular#1.2.14 bower install ng-ckeditor#0.2.1 bower install angular-highlightjs#0.3.0 bower install angular-route#1.2.14 bower install highlightjs#8.0.0 bower install angular-bootstrap#0.11.2 bower install bootstrap#3.0.3 bower install jquery#2.0.3 bower install angular-cookies#1.2.14 bower install angular-mocks#1.2.14 bower install angular-scenario#1.2.14 bower install ng-json-explorer#8c2a0f9104 bower install angularjs#1.2.28 | ckeditor#4.3.3 ui/app/bower_components/ckeditor mlFacets#0.0.4 ui/app/bower_components/mlFacets âââ angular#1.2.14 âââ bootstrap#3.0.3 âââ jquery#2.0.3 font-awesome#4.0.3 ui/app/bower_components/font-awesome angular#1.2.14 ui/app/bower_components/angular ng-ckeditor#0.2.1 ui/app/bower_components/ng-ckeditor âââ angular#1.2.14 angular-highlightjs#0.3.0 ui/app/bower_components/angular-highlightjs âââ angular#1.2.14 âââ highlightjs#8.0.0 angular-route#1.2.14 ui/app/bower_components/angular-route âââ angular#1.2.14 highlightjs#8.0.0 ui/app/bower_components/highlightjs angular-bootstrap#0.11.2 ui/app/bower_components/angular-bootstrap âââ angular#1.2.14 bootstrap#3.0.3 ui/app/bower_components/bootstrap âââ jquery#2.0.3 jquery#2.0.3 ui/app/bower_components/jquery angular-cookies#1.2.14 ui/app/bower_components/angular-cookies âââ angular#1.2.14 angular-mocks#1.2.14 ui/app/bower_components/angular-mocks âââ angular#1.2.14 angular-scenario#1.2.14 ui/app/bower_components/angular-scenario âââ angular#1.2.14 ng-json-explorer#8c2a0f9104 ui/app/bower_components/ng-json-explorer âââ angularjs#1.2.28 angularjs#1.2.28 ui/app/bower_components/angularjs > [email protected] install > /Users/pmakwana/MyWork/appfirst/node_modules/karma/node_modules/chokidar/node_modules/fsevents > node-gyp rebuild xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools. No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. | No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. gyp: No Xcode or CLT version detected! gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12) gyp ERR! System Darwin 13.4.0 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/pmakwana/MyWork/appfirst/node_modules/karma/node_modules/chokidar/node_modules/fsevents gyp ERR! node -v v0.12.2 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok > [email protected] install > /Users/pmakwana/MyWork/appfirst/node_modules/phantomjs > node install.js Download already available at /var/folders/d3/4b5dd7295jd1dfb2zsn6vcd800915c/T/phantomjs/phantomjs-1.9.8-macosx.zip Extracting zip contents Removing /Users/pmakwana/MyWork/appfirst/node_modules/phantomjs/lib/phantom Copying extracted folder /var/folders/d3/4b5dd7295jd1dfb2zsn6vcd800915c/T/phantomjs/phantomjs-1.9.8-macosx.zip-extract-1430393230352/phantomjs-1.9.8-macosx -> /Users/pmakwana/MyWork/appfirst/node_modules/phantomjs/lib/phantom Writing location.js file Done. Phantomjs binary available at /Users/pmakwana/MyWork/appfirst/node_modules/phantomjs/lib/phantom/bin/phantomjs npm WARN optional dep failed, continuing [email protected] > [email protected] install > /Users/pmakwana/MyWork/appfirst/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws > (node-gyp rebuild 2> builderror.log) || (exit 0) [email protected] node_modules/karma-phantomjs-launcher [email protected] node_modules/gulp-rename [email protected] node_modules/karma-ng-html2js-preprocessor [email protected] node_modules/karma-jasmine [email protected] node_modules/cookie-parser âââ [email protected] âââ [email protected] [email protected] node_modules/yargs [email protected] node_modules/express-session âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected]) [email protected] node_modules/express âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] ([email protected]) âââ [email protected] âââ [email protected] ([email protected]) âââ [email protected] ([email protected]) âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected]) âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected], [email protected]) [email protected] node_modules/gulp-karma âââ [email protected] ([email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) [email protected] node_modules/body-parser âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] ([email protected]) âââ [email protected] âââ [email protected] ([email protected]) âââ [email protected] ([email protected], [email protected]) âââ [email protected] [email protected] node_modules/gulp-concat âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) âââ [email protected] ([email protected]) [email protected] node_modules/gulp-uglify âââ [email protected] âââ [email protected] ([email protected]) âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected]) [email protected] node_modules/gulp âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] ([email protected]) âââ [email protected] ([email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) âââ [email protected] âââ [email protected] ([email protected], [email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) [email protected] node_modules/phantomjs âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] ([email protected]) âââ [email protected] âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) [email protected] node_modules/gulp-jshint âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) âââ [email protected] ([email protected], [email protected]) âââ [email protected] âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) [email protected] node_modules/karma âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected]) âââ [email protected] âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) âââ [email protected] ([email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected]) [email protected] node_modules/gulp-less âââ [email protected] âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected], [email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) âââ [email protected] ([email protected]) âââ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) pmakwana-macbookair:MyWork pmakwana$ pwd /Users/pmakwana/MyWork pmakwana-macbookair:MyWork pmakwana$ ls -ltr total 16 drwxr-xr-x 11 pmakwana 5762 374 Apr 30 20:17 ML7 -rwxr-xr-x 1 pmakwana 5762 5138 Apr 30 21:26 ml drwxr-xr-x 25 pmakwana 5762 850 Apr 30 21:26 appfirst pmakwana-macbookair:MyWork pmakwana$ cd appfirst/ pmakwana-macbookair:appfirst pmakwana$ ls CHANGELOG.mdown karma-e2e.conf.js rest-api CONTRIBUTING.md karma.conf.js server.js README.mdown license.txt src bower.json ml ui data ml.bat version.txt deploy node_modules gulpfile.js package.json pmakwana-macbookair:appfirst pmakwana$ ./ml local bootstrap Bootstrapping your project into MarkLogic 7 on localhost... ... Bootstrap Complete pmakwana-macbookair:appfirst pmakwana$ ./ml local deploy content Loaded 25 documents from /Users/pmakwana/MyWork/appfirst/data to localhost:8041/appfirst-content pmakwana-macbookair:appfirst pmakwana$ ./ml local deploy modules Loaded 1 document from /Users/pmakwana/MyWork/appfirst/src to localhost:8041/appfirst-modules at 04/30/2015 09:29:29 pm ERROR: 404 "Not Found" ERROR: pmakwana-macbookair:appfirst pmakwana$ cat deploy/build.properties ################################################################# # This file contains overrides to values in default.properties # Make changes here, not in default.properties ################################################################# # # Admin username/password that will exist on the dev/cert/prod servers # user=admin password=admin # Your Application's name app-name=appfirst # The root of your modules database or filesystem dir modules-root=/ # The prefix for your modules in the modules database modules-prefix=/ # # the location of your marklogic configuration file # # config.file=${basedir}/deploy/ml-config.xml # # Unit Testing # Leave commented out for no unit testing # turn these on if you are using the roxy unit tester # Note: to activate Unit Testing, you must have test-content-db and test-port defined # # test-content-db=${app-name}-content-test # test-modules-db=${app-name}-modules # test-port=8042 # # The authentication method used for your test appserver # application-level, basic, digest, digestbasic # # test-authentication-method=digest # # end of Unit Testing section # # Leave commented out for default # # schemas-db=${app-name}-schemas # # Leave commented out for default # turn it on if you are using triggers or CPF # # triggers-db=${app-name}-triggers # # the port that the Docs appserver is running on # Docs appserver is required for boostrapping # set this to 8000 for ML 4.x and 8002 for ML 5.x # you should only override this if your Docs appserver # is running on a funky port # # bootstrap-port= # # The ports used by your application # app-port=8040 xcc-port=8041 # odbc-port=8043 # # set this to false if you are using an existing XCC server and # you don't want Roxy to manage it for you # # install-xcc=true ## Security # # The authentication method used for your appserver # application-level, basic, digest, digestbasic # authentication-method=digestbasic # # The user used as the default user in application level authentication. # Using the admin user as the default user is equivalent to turning security off. # # default-user=${app-name}-user # # The password assigned to the default user for your application # appuser-password=^U|}n36)TPM7&7%/8cdz # # To make your http appserver use TLS/SSL, uncomment the ssl-certificate-template # here and uncomment the ssl-certificate-template element in ml-config.xml. # # To create a template, uncomment at least ssl-certificate-template, # ssl-certificate-countryName, and ssl-certificate-oranizationName # ssl-certificate-template=roxy # ssl-certificate-countryName=US # ssl-certificate-stateOrProvinceName=LA # ssl-certificate-localityName=New Orleans # ssl-certificate-organizationName=Zulu Krewe # ssl-certificate-organizationalUnitName=BeadBase # [email protected] # # end of Security section # # The type of application. Choices are: # bare: a bare Roxy app project # mvc: a normal, XQuery-based Roxy MVC app # rest: an app based on the ML6 REST API # hybrid: an app that uses Roxy rewriting and the ML6 REST API # app-type=rest # # The major version of MarkLogic server you are using # 4, 5, 6, 7 # server-version=8 # # the location of your REST API options # relevant to app-types rest and hybrid. # rest-options.dir=${basedir}/rest-api/config # # the location of your REST API extension modules # relevant to app-types rest and hybrid. # rest-ext.dir=${basedir}/rest-api/ext # # the location of your REST API transform modules # relevant to app-types rest and hybrid. # rest-transforms.dir=${basedir}/rest-api/transforms # # The Roxy rewriter handles both Roxy MVC and the ML REST API # url-rewriter=/MarkLogic/rest-api/rewriter.xqy error-handler=/MarkLogic/rest-api/error-handler.xqy rewrite-resolves-globally=true # # the uris or IP addresses of your servers # WARNING: if you are running these scripts on WINDOWS you may need to change localhost to 127.0.0.1 # There have been reported issues with dns resolution when localhost wasn't in the hosts file. # local-server=localhost #dev-server= #cert-server= #prod-server= # # If you want to use MLCP, make sure mlcp-home is configured correctly. Using a common location as default. # mlcp-home=/usr/local/mlcp mlcp-vmargs=-Xmx512m # folder to ignore when deploying into modules database #ignore-folders=.*/src/(node_modules|.tmp)/.* pmakwana-macbookair:appfirst pmakwana$ ./ml local wipe Wiping MarkLogic setup for your project from localhost... ************************************ *** RESTART OF MARKLOGIC IS REQUIRED ************************************ ... Wipe Complete pmakwana-macbookair:appfirst pmakwana$ ./ml local restart Restarting MarkLogic Server group of localhost Group Default restarted pmakwana-macbookair:appfirst pmakwana$ ./ml local bootstrap Bootstrapping your project into MarkLogic 8 on localhost... ... Bootstrap Complete pmakwana-macbookair:appfirst pmakwana$ ./ml local deploy content Loaded 25 documents from /Users/pmakwana/MyWork/appfirst/data to localhost:8041/appfirst-content pmakwana-macbookair:appfirst pmakwana$ ./ml local deploy modules Loaded 1 document from /Users/pmakwana/MyWork/appfirst/src to localhost:8041/appfirst-modules at 04/30/2015 09:33:28 pm ERROR: 404 "Not Found" ERROR: pmakwana-macbookair:appfirst pmakwana$
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
