Giter Club home page Giter Club logo

demo-web-project's Introduction

Optimize Prime

Our homepage can be found here:
http://foodtruckop.com

Overview

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!

Authors

Environment Setup

  1. Install the latest Maven.
  2. Install the latest Eclipse.
  3. Make sure your Eclipse has Maven installed (It should have been included in the latest version of the Eclipse)
  4. Install a MySQL Server. We recommend installing XAMPP for easy MySQL setup and execution.

Importing the Project into Eclipse

  1. File → Import → Maven → Existing Maven Projects
  2. Select the directory containing the pom.xml file
  3. You're all set!

Building the Project for the First Time

  1. Right-click on the project root folder → Maven → Update Project

Running the Project Locally

  1. Make sure your MySQL server is running. XAMPPImage1
  2. In Eclipse, locate App.java in src/main/java source folder and right-click on it → Run As → Java Application
  3. 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.

Employing on a Live Server

Environment Setup

  1. Obtain a server, either from Amazon, Google, or any company of your choice.
  2. 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

  1. Install MySQL on your server.

Run the Server

  1. Secure copy via either the command scp or WinSCP the cs480-1.0.jar file, or whatever name you have for your compiled file.
  2. 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.
  3. 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

  1. 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 &

Optional

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

demo-web-project's People

Contributors

toddnguyen47 avatar sunyu912 avatar johnhalowang avatar aacuellar00 avatar raechiang avatar asartoonian avatar isaac-siegel avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar Adrian Cuellar avatar  avatar  avatar  avatar

Forkers

toddnguyen47

demo-web-project's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.