This project provides the server functionality of the BokBytarAppen app.
Follow these steps to get started:
-
Git-clone this repository.
$ git clone git://github.com/nilewapp/BokBytarAppenServer -
cd into the project directory
$ cd BokBytarAppenServer -
Copy application.conf.example to
/src/main/resources/application.conf$ cp ./src/main/resources/application.conf.example ./src/main/resources/application.conf -
Launch SBT:
$ sbt -
Launch the scala console and initialize the database:
> console scala> com.mooo.nilewapps.bokbytarappen.server.DBManager.init scala> :quit -
Start the application:
> re-start -
Access the application at
https://localhost:8443/<service from Service.scala>in any web browser. -
Stop the application:
> re-stop
Some tests are dependent on a test database. The instructions below explains how to do this.
-
Copy application.conf.example to
/src/test/resources/application.conf$ cp ./src/main/resources/application.conf.example ./src/main/resources/application.conf -
Launch SBT
$ sbt -
Launch the scala test console and initialize the database:
> test:console scala> com.mooo.nilewapps.bokbytarappen.server.DBManager.init scala> :quit -
After this initial setup is done, the tests can be executed:
> test
-
Follow the instructions listed in the app repository README
-
cd into the server project directory
-
Download the following jar in order to be able to generate the truststores: bcprov-jdk16-146.jar
-
Generate trust stores and certificates
$ ./tools/gentruststores "<your password>" <path to bcprov jar>/bcprov-jdk16-146.jar -
Copy the generated file
keystore.jksto/src/main/resources/or the location of your choice -
Update
application.confto contain correct path tokeystore.jksand the password that you choose for it (Note: if you copied the keystore into/src/main/resources/the default path is correct)... truststore { path = <path to keystore.jks> pass = <your password> } ... -
Copy the file generated by
gentruststorescalledpublic_truststore.bksto<app directory>/res/raw/ -
Add the password in
<app directory>/res/values/strings.xmlor the file of your choosing (e.g./res/values/secret.xml)... <string name="truststore_password">your password</string> ... -
Update the url to the server in
<app directory>/res/values/server.xml... <string name="server_url">https://yourdomain.com:8443/</string> ...
Copyright 2013 Robert Welin
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.