This is the Urban Data Observatory front-end. A tool for exploring data and imagine future experiments using the Organicity EaaS platform. This works together with the Organicity APIs.
This tool is based on the SmartCitizen front-end framework.
You need git to clone the repository. You can get git from http://git-scm.com/.
This project uses node version 4.2, see the version number in the file .nvmrc
We also use a number of node.js tools to initialize and test the Web App. You must have node.js and its package manager (npm) installed. You can get them from http://nodejs.org/.
Also gulp: npm install -g gulp
(with sudo
if you are using Mac).
Clone the repository using:
git clone https://github.com/OrganicityEu-Platform/organicity-urban-data-observatory.git
cd UrbanDataObservatory
- Install tools to manage and test the application:
npm install.
- No need of
bower install
,npm install
will take care of it.
gulp
orgulp build
to build an optimized version of your application in/dist
gulp serve
to launch a browser sync server on your source filesgulp serve:dist
to launch a server on your optimized applicationgulp test
to launch your unit tests with Karmagulp test:auto
to launch your unit tests with Karma in watch modegulp protractor
to launch your e2e tests with Protractorgulp protractor:dist
to launch your e2e tests with Protractor on the dist files
Note: in case you see something like:
Error: Command failed: fatal: unable to read c6a8d370f3e95d9110eca4a03b704bd8940ca40b
Run:
rm -Rf $(node -e "console.log(require('path').join(require('os').tmpdir(), 'tmpRepo'))")
docker-compose up
Visit localhost:8080
Best Practice Recommendations for Angular App Structure
Visit https://github.com/ajoslin/conventional-changelog/blob/master/CONVENTIONS.md
Same for all types of components: ..js Ex: resources.controller.js, sensor.service.js, profileTools.constant.js
Controller: Controller. Ex: MapController Service: . Ex: device, kit, user Constructor: . Ex: User, Kit. Note: Constructors are actually made using services. Constants: . Ex: PROFILE_TOOLS
For data that has been resolved from the router, I've normally appended 'Data' to the name.
Working locally against a local assets API (instead of https://discovery.organicity.eu)
Edit /etc/hosts to contain:
127.0.0.1 discovery.organicity.eu
(The old way was to change the file)
'src/app/core/api/asset.api.service.js' to:
RestangularConfigurer.setBaseUrl('http://localhost/v0'); //http://discovery.organicity.eu/v0
- Staging: Do
cap staging deploy
and select the branch you want to deploy at http://staging.organicity.smartcitizen.me/ - Production: Do
cap production deploy
to deploy themaster
branch at http://organicity.smartcitizen.me/