version: 3.0
This repository holds the frontend user-interface (UI) code for the United States Department of Transportation (U.S. DOT) Joint Program Office (JPO) Intelligent Transit Systems (ITS) CodeHub website located at https://its.dot.gov/code.
Changes are in reference with the previous version (2.6)
- Implementation of carousel of cards component.
- Home page changed to display carousel of cards.
- Card component
- Refactored to show/hide the projects stats section.
- Refactored to display or not the Featured ribbon decorator base on property and data.
The CodeHub UI is a Dockerized application. While it is possible to run this application natively, we strongly recommend that you use Docker to abstract away the complications of Node version management and package installation.
- Docker Version 19.03 (or higher)
- A running instance of the CodeHub API (and therefore ElasticSearch)
- A running instance of the Constant Contact API
The UI requires a running CodeHub API instance to which it can connect. See the codehub-api repository for instructions.
After you have the CodeHub Web API and Constant Contact API running, you may run the CodeHub UI in Docker using the following steps:
- Set the
PROXY_PASS_WEBAPI
environment variable to the following:proxy_pass "PROTOCOL://URL:PORT";
where the protocol is http or https, URL is the location of your CodeHub Web API, and port is the port it is running on. - Set the
PROXY_PASS_APICC
environment variable to the following:proxy_pass "PROTOCOL://URL:PORT";
where the protocol is http or https, URL is the location of your Constant Contact API, and port is the port it is running on. - Run the
./build-and-run-docker.sh
script present in the top level of this repository.
Unit tests are run via the aurelia-cli and use karma and jasmine as test-runners.
au test
au test --watch
Integration tests are performed with Protractor.
- Place your E2E-Tests into the folder
test/e2e/src
- Install the necessary webdriver.
gulp webdriver-update
-
Configure the path to the webdriver by opening the file
protractor.conf.js
and adjusting theseleniumServerJar
property. Typically its only needed to adjust the version number. -
Make sure your app runs and is accessible
au run
- In another console run the E2E-Tests
au protractor
Deployment of the UI is similar to running in Docker locally, you must set the two proxy pass environment variables.
Important: if the CodeHub Web API or the Constant Contact API are running behind load balancers, you will need to set their proxy pass environment variables using the nginx resolver directive, as follows:
export PROXY_PASS_WEBAPI='resolver 10.0.0.2 valid=10s; set $backend "http://example-loadbalancer.amazonaws.com:3000"; proxy_pass $backend;'
export PROXY_PASS_APICC='resolver 10.0.0.2 valid=10s; set $backend "http://example-loadbalancer.amazonaws.com:3000"; proxy_pass $backend;'
Where 10.0.0.2 is the location of your network's domain name server (10.0.0.2 is the default for an AWS VPC with the default 10.0.0.0/16 CIDR), and the example-loadbalancer is the URL and port of your API's load balancer.
- Docker - Containerization Platform
- Node - JavaScript Runtime Environment
- Aurelia - JavaScript Web Application Framework
Please contribute to this repository using GitHub Pull Requests and GitHub Issues.
The Developers of ITS CodeHub.
This project is licensed under the Apache 2.0 License.
Agency: DOT Short Description: The backend API for the ITS CodeHub repository-sharing website. Status: Beta Tags: transportation, connected vehicles, intelligent transportation systems, javascript, api Labor Hours: 0 Contact Name: Brian Brotsos Contact Phone: