- Separate web app frontends written in
AngularJS
/GoogleMapsJS
. - In future work we aim to migrate to:
VueJS
+Leaflet
. - sample code
- All web apps share some resources:
shared
├── css
├── images
└── js/
└── anyplace-core-js
- architect:
AngularJS
+Grunt
- viewer:
AngularJS
+Grunt
- viewer_campus:
AngularJS
+Grunt
- developers:
sbt-play-swagger
+swagger-ui
- this is generated by the backend (see DOCUMENTATION.md)
- anyplace-vue: sample
VueJS
+Leaflet
code
- If starting from scratch you can clone:
git clone [email protected]:dmsl/anyplace.git git.web
- If the code was there, make sure to keep it updated
- e.g.
git pull
ingit.web
to fetch latest sources..
- e.g.
- active development of the web apps is on the branch:
develop-clients-web
- you might want to
checkout
that one, or themaster
one
- you might want to
- You must modify:
shared/js/anyplace-core-js/api.js
- and enter your backend's URL by modifying the API.url variable
- the public anyplace server is:
https://ap.cs.ucy.ac.cy:44/api
- The Angular apps need some dependencies
- these apps are:
- architect, viewer, or viewer_campus
- These are sample commands.
- Use up-to-date info to install the tools below
sudo apt install npm
sudo npm install -g bower
sudo apt install node-grunt-cli
- Repeat this process for each app
cd
to each app dir
bower install
npm install # npm install -g grunt-cli
- the development version will keep watching for resource changes
- e.g. when you modify a JS file, it will recompile
- or when you put new images or CSS files in
/shared/
, it will recompile/optimize those
- use it when you are developing
- if you want to
deploy
anyplace (i.e., on a server) use the second command
grunt # development version, that "watches" for changes
grunt deploy
## for windows use:
## grunt.cmd
- this will generate many files
- these will reside in the
build
folder of each app - those are ignored from
git
<web-app>
├── build
│ ├── css
│ │ └── anyplace.min.css # Concatenated and minified CSS
│ ├── images
│ │ └── ... # Optimized images
│ └── js
│ └── anyplace.min.js # Concatenated and minified JS files
├── bower_components
│ └── ... # Bower dependencies
└── index.html
Sample script: deploy_webapps.sh
Output
- probably will need adjustments but it's a good starting point
- First, you must download the sources
- Install any tools
- Compile + Deploy the apps