#IER Frontend
This is the Individual Electoral Registration (aka ERTP) Frontend app. The point of it is to provide a simple Register to Vote form to the public.
Please note that this source code will not run as is, as it has API dependencies which are not open sourced. This code is presented for informational purposes only.
###Depedencies
To run this app you will need:
- Java 7 (we use openJDK 7)
- Ruby 1.9.3
- Sass
- Bundler
All other depedencies (Play framework, Scala, sbt, etc) will be installed as part of the sbt start script.
###Bootstrap project and run the service
-
git clone git@github.gds:gds/ier-frontend.git -
In a terminal execute
./sbtto open the Play console -
Wait (Downloading the entire internet)
-
In the SBT console execute
compileto compile the app -
Create directory
/var/log/ierwith write access rights for the current user, e.g:_sudo mkdir /var/log/ier_ _sudo chown root:users /var/log/ier_ _sudo chmod 770 /var/log/ier_ -
In the SBT console execute
runto start the app -
Go to http://localhost:9000/
[Note: I got an internal error had to re-
gem install sassto fix it ]
###Running the service
-
In a terminal execute
./sbtto open the SBT console -
In the SBT console execute
runto start the app -
Or just
./sbt run -
Go to
http://localhost:9000/
###Front-end development
The CSS and JS files Play serves are compiled versions of those in the ./assets folder.
There are Gulp tasks to build the compiled CSS and JS in the ./scripts/gulp folder.
The ./scripts/gulp folder has a guide to setting up Gulp and to the tasks in its README.
###Running the tests
Testing for the ier-frontend project is via the sbt command line as follows...
-
In the terminal execute
./sbtto open the SBT console -
In the SBT console execute
testto begin ALL the tests -
Or just
./sbt test
NB : Make sure you follow the Bootstrap Step 5 above to make the /var/log/ier/ folder locally wriateable.
NB : To run a specific test rather than all of them test-only FULL_PATH_OF_TEST_CLASS