BIAD/ctrp-ui-redesign

Name: ctrp-ui-redesign

Owner: NCI CBIIT Development Sandbox

Owner: Biomedical Informatics Applications Development

Description: null

Created: 2016-11-22 20:53:12.0

Updated: 2018-03-21 21:26:22.0

Pushed: 2017-02-13 18:47:16.0

Homepage: null

Size: 83316

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Codacy Badge Build Status Code Climate Test Coverage Issue Count

Build the FrontEnd Code with Gulp:
  1. The virtual machine is required to have npm and the following npm packages installed: gulp, bower, and express. If not installed already, execute the following command to install the dependencies on server:

  2. npm install -g gulp bower express

  3. Execute the following commands in terminal to build the FrontEnd code:

  4. npm install

  5. bower install

  6. gulp clean

  7. gulp build

  8. To create a tarball of the build, execute gulp tarball. Once this is done, you should see a file named build.tar.gz.

  9. The gulp build command in last step could take up to 3 minutes to finish. Once that is done, the built code can be found inside the directory /build, in which there is the index.html file. The web server should point to this file for serving the FrontEnd code.

Serve the FrontEnd Code for Development in Local Environment:
  1. Make sure your machine has npm and those npm packages installed: gulp, bower, and express

  2. Execute gulp serve-dev, and a new browser tab will be launched automatically. Whenever code changes are made to the frontend, this browser tab automatically refreshes itself so you can see the effects of code changes almost immediately without having to manually refresh the browser.

Adding or Chaining Gulp Tasks:
  1. Gulp tasks are like modules in a pipeline, you add/remove/chain tasks
  2. The tasks are configured in the gulpfile.js file. There are plenty of examples in this file.
Changing the Host/Backend URL:

The current configuration of the FrontEnd uses the file src/app/modules/ctrp.module.constants.host.js for making requests to the backend server. In that file, the url for the HOST constant should be changed to the actual URL of the backend server environment.

Docker Build: docker build -t ctrp/ctrp-ui-redesign . docker run -it –rm -p 80:80 -p 443:443 ctrp/ctrp-ui-redesign:latest


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.