janmichaelyu / cg-ef-slushapp

CG Expert Finder - Slush Application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search Application for CG Expert Finder

This is the front-end web application that provides search and data interrogation functionality for the CG Expert Finder system. This is the web application that would be used by the business to search across all of the data that's been ingested by the CG Expert Finder Data Hub project.

This README assumes you have already installed and configured the CG Expert Finder Data Hub project, and that you have ingested and harmonized the data into the FINAL database.

This search application was generated with the Slush-MarkLogic-Node generator, and uses 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

Required Dependencies

To deploy and run this application you will need:

  • node.js v0.10+
  • npm v2+: Built-in package manager for node (comes with node)
  • gulp: Javascript task automation (npm install -g gulp)
  • Bower: A package manager for front-end libraries (npm install -g bower)
  • Git - Roxy depends on this version control system
  • Ruby v1.9.3+ - Roxy depends on Ruby in order to run server configuration scripts

Note: the node command has been renamed to nodejs. Some dependencies still point to node, which is out of our control. You may need to manually alias those commands, or install the node-legacy package.

Microsoft Windows users should also read the Additional Microsoft Windows Requirements.

Instructions

NOTE ON FOLDER STRUCTURE: Again, it is assumed here that you have already installed the CG Expert Finder Data Hub project. If you want to mirror the directory structure of the original CG Expert Finder project, you will want to use the base directory that you created to house the CG EF Data Hub project. For example, you should have something like...

/Users/mmoody/Projects/cg-expertfinder
    /cg-ef-datahub

And by following the steps below, you will create another project folder here for the Slush application.

...

Navigate to your base folder (i.e., /cg-expertfinder) and clone this repo using the following command.

git clone https://github.com/MJMoody/cg-ef-datahub.git cg-ef-slushapp

This will copy the contents of this code repository into a new folder called cg-ef-slushapp. So again, assuming you are mirroring the original project structure, you should now have...

/Users/mmoody/Projects/cg-experfinder
    /cg-ef-datahub
    /cg-ef-slushapp

In your terminal, navigate to your new /cg-ef-slushapp directory.

Run npm install.

Run bower install.

Run gulp init-local, and specify the following,

  • MarkLogic version? 8
  • MarkLogic host? leave default for localhost, or set to MarkLogic hostname
  • MarkLogic Admin User/Password? enter admin user and admin password
  • MarkLogic App/Rest port? MarkLogic port that points to CF EF Data Hub FINAL database
  • Node app port? leave default
  • Allow anonymous...? leave default, false
  • Disallow proxying...? leave default, false
  • Only allow access...? leave default, false

Edit the /deploy/local.properties file as follows...

  • Update server-version to 9
  • Ensure local-server and app-port are pointed to your CG EF Data Hub FINAL database
  • Update content-forests-per-host to match the setup of your CG EF Data Hub FINAL database (default would be 4)
  • Add the following lines to the end of the file, after the Admin username/password section, and update the DB names below to match the database names you setup with your CF EF Data Hub

_

app-role=data-hub-role

authentication-method=digest

default-user=admin

content-db=data-hub-v1-FINAL

modules-db=data-hub-v1-MODULES

schemas-db=data-hub-v1-SCHEMAS

triggers-db=data-hub-v1-TRIGGERS

Edit the local.json file as follows...

  • Update ml-version to 9
  • Update ml-app-user to admin
  • Update ml-app-pass to your admin password
  • Ensure ml-host and ml-http-port are pointed to your CG EF Data Hub FINAL database

Run ./ml local deploy modules to install Slush server code to your MarkLogic server.

Run gulp serve-local. This will start the Slush application and should open a new web browser window pointed to localhost:9070. This is your Slush search application.

Login to the web application using your admin username and password.

You should now be able to navigate to the Search page and see the data coming from your FINAL database.

Open another web browser window and go to the MarkLogic admin console (localhost:8001). You will need to login with your admin credentials.

In the Databases window, click on your FINAL database. On the left side menu, click on Path Range Indexes and add the following two indexes...

scalar type:            string
path expression:        Description
collation:              http://marklogic.com/collation/codepoint
range value positions:  false
invalid values:         reject

scalar type:            string
path expression:        ConsultantName
collation:              http://marklogic.com/collation/codepoint
range value positions:  false
invalid values:         reject

Click ok.

About

CG Expert Finder - Slush Application

License:Other


Languages

Language:XQuery 37.3%Language:Ruby 36.6%Language:JavaScript 17.2%Language:HTML 5.2%Language:CSS 1.3%Language:XSLT 1.2%Language:Shell 0.6%Language:Batchfile 0.6%