A online Checkers Game where you will play against a computer AI.
Get the project up and running with Eclipse Mars. This project has two separate applications. One is server side and a REST application that communicates with the database. The other is client side. They're called "CheckersService" and "CheckersClient" for our purposes.
- Java 8
- Tomcat v7 Server
- Run
db_and_user_setup.xml
script with root priviledges to create the user and database for this project. This is optional. To use different databases or users, editpersistence.xml
to match (under/CheckersService/src/main/java/META-INF
).
- Import
CheckersClient
as a new maven project. - Import
CheckersService
as a new maven project. - Add
CheckersClient
to the Tomcat webserver. - Add
CheckersService
to the Tomcat webserver.
- Start the Tomcat webserver.
- Two endpoints should be available from your browser:
- Both projects should be configured to run Java 8:
- Right click Properties > Java Compiler > Set "Compiler compliance level" to 1.8
- Right click Properties > Project Facets > ("Details" tab is selected) > Select 1.8 for Java version > OK
- Both projects should be configured to run with the Tomcat server. (Right click project > Properties > Project Facets > Select "Runtimes" tab > Select "Apache Tomcat v7.0" > OK)
The following instructions are for Mac and assume the SSH key (.pem
file) is saved and populated.
SSH Tunnel to access phpMyAdmin locally (http://localhost:8888/phpmyadmin):
ssh -v -N -L 8888:127.0.0.1:80 -i [`.pem` file path] [email protected]
*"[.pem
file path]" will need to be updated to reflect your saved location/file name.
-
Export both CheckersClient and CheckersService as a .war file.
-
Move CheckersClient.war and CheckersService.war to the home directory on the server.
scp -i [.pem file path] [file path]CheckersClient.war [email protected]:~/ scp -i [.pem file path] [file path]CheckersService.war [email protected]:~/
*Update relative paths for war files & SSH key before running.
-
SSH into the server.
ssh -i [.pem file path] [email protected]
*Update relative path for SSH key before running.
-
Move the
.war
files into the destination directory. This requiressudo
, which is why it is not done in step #2.sudo mv CheckersClient.war ~/stack/apache-tomcat/webapps sudo mv CheckersService.war ~/stack/apache-tomcat/webapps
-
New code should automatically deploy at http://cst438-checkers.bitnamiapp.com/CheckersClient/ and http://cst438-checkers.bitnamiapp.com/CheckersService.