Commit 2c2e68c4 authored by Gerrit Hübbers's avatar Gerrit Hübbers 🃏
Browse files

Fix mistake in command. Expand documentation on front-end processed artifacts.+

parent 685e80b8
......@@ -81,10 +81,7 @@ This will create the executable web application artifact located at `target/dda-
Next, create a directory where the DDA binary will reside:
sudo sh -c "mkdir /srv/dda && chown dda:dda /srv/dda && chmod u=rx,g=,o= /srv/dda"
# This command will create a directory `/srv/dda/`,
# set Linux user and group `dda` as its owner,
# and set minimal access rights to further increase security.
sudo sh -c "mkdir /srv/dda"
......@@ -339,7 +336,11 @@ The`yeoman-maven-plugin` runs the following commands in *this* project's root di
# Walkthroughs and architectures
## Front-end AngularJS walkthrough
The Spring backend serves out, via HTTP, the (processed) contents of directory `src/main/webapp/`, where `index.html` is located. `index.html` in turn references all (minified and concatenated) JavaScript assets, including file `app.js`.
The Spring backend serves out, via HTTP, either the unprocessed or the Grunt-processed (i.e., minified, concatenated, revved, etc.) frontend artifacts. Whether unprocessed or processed artifacts are served out depends on which Spring profile is active: among other things, `@Configuration` class `org.gesis.dda.wizard.config.WebConfigurer` checks for an active `prod` Spring profile. If the `prod` profile is active, `WebConfigurer` will add an additional servlet filter called `StaticResourcesProductionFilter` to the filter chain. That filter forwards (server-side and therefore opaque to the visiting user) any frontend artifact request to the same address prefixed with `/dist` (see *Servlet 3.1* specification, *10.5 Directory Structure* for more information on how static Servlet directory content gets served out). During the Grunt build phase, processed frontend artifacts were put into directory `/dist/`.
If the `prod` profile is not active, requests for frontend artifacts will be served out normally, i.e. relative to the servlet's root directory.
Either way, an HTTP request for `/` will serve out the corresponding `index.html` artifact. `index.html` in turn references all JavaScript assets, including file `app.js`.
### `app.js`
`app.js` creates a new module, `ddaApp`, and provides all of its dependent modules. The `ddaApp` module:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment