Our homepage can be found here:
http://foodtruckop.com
Optimize Prime's project to put all your food truck needs in one place! If you feel the need to satisfy your food truck cravings, you can use our web service to find food trucks that can do just that.
Want that delicious Korean fusion or the ice cream in plant pots that hits the right spot? Look no more!
- Install the latest Maven.
- Install the latest Eclipse.
- Make sure your Eclipse has Maven installed (It should have been included in the latest version of the Eclipse)
- Install a MySQL Server. We recommend installing XAMPP for easy MySQL setup and execution.
- File → Import → Maven → Existing Maven Projects
- Select the directory containing the pom.xml file
- You're all set!
- Right-click on the project root folder → Maven → Update Project
- Make sure your MySQL server is running.
- In Eclipse, locate App.java in src/main/java source folder and right-click on it → Run As → Java Application
- Verify the running process in your web browser with the following URLs:
NOTE: Our project employs the use of a self-signed SSL certificate in order to enable HTTPS. Your browser (Chrome/Firefox/Safari/Internet Explorer) might warn you about an unsafe site. Do NOT worry! Our site is perfectly safe. We only use HTTPS to get your current location using geolocation. You are welcome to decline our site's request for geolocation and our site will still work. You can still search via Zip Code, Address, or City.
Environment Setup
- Obtain a server, either from Amazon, Google, or any company of your choice.
- On your server, update your Java to Java 8. The commands will differ depending on your distribution. If you are using Amazon's distribution, Amazon Linux, here are the commands
sudo yum install java-1.8.0
sudo yum remove java-1.7.0-openjdk
- Install MySQL on your server.
Run the Server
- Secure copy via either the command
scp
or WinSCP the cs480-1.0.jar file, or whatever name you have for your compiled file. - IMPORTANT STEP! In your server, make a folder named "src." In this newly created src folder, secure copy the file "keystore.p12." In other words, you want the path
src/keystore.p12
to exist in the same folder as your jar file in your server. - Start your MySQL server. If you install MySQL in the default directory, this is the command to start the server
sudo /etc/init.d/mysqld start
Similarly, if you need to restart your server, use the following command:
sudo /etc/init.d/mysqld restart
- Start your java server. We will use nohup to ensure that the server keeps running even when we exit our terminal.
killall -9 java || true
nohup java -jar /home/ec2-user/cs480-1.0.jar >/dev/null 2>&1 &
If you do not want to redirect your Java output:
nohup java -jar /home/ec2-user/cs480-1.0.jar &
If you want to redirect your Java output to a text file:
nohup java -jar /home/ec2-user/cs480-1.0.jar >logfile.txt 2>&1 &
If you are on Windows, you can simply open a command prompt in the root folder and type in "mavenScriptWindows" and your server will run. This is useful if you are only editing the front end and do not want to update Maven manually in Eclipse.
You can do the same thing in Linux/MacOS. Simply create a startScript.sh file (a Bash file) and type in the following commands:
mvn package
java -jar ./target/cs480-1.0.jar
Then, give startScript.sh the ability to execute by typing in the terminal:
chmod +x startScript.sh
Lastly, you can run the script with ./startScript.sh