You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This app is written in Java. The RESTful API uses SpringBoot, and the database used is MySQL. Hibernate is used to map the Java classes to the database. All builds must be done with Maven. Travis CI is monitoring the builds, and the unit tests ensure that the functionality is correct. To see more information about Travis CI, please see the home page of the t00 Wiki, under the header "Continuous Integration".
Before running the application
Before running the application, please ensure that you have done the following:
1. Install Maven, SpringBoot, mySQL, and Hibernate
2. Create a user in your local mySQL database called huser
i. Open a terminal
ii. Type the command "mysql -u <your_username> -p", and enter password when prompted
a. If the database is local, replace <your_username> with root
iii. Type the command "CREATE USER 'huser'@'localhost' IDENTIFIED BY 'hpassword'";
iv. Type the command "GRANT ALL PRIVILEGES ON . TO 'huser'@'localhost' WITH GRANT OPTION;"
a. For more information on setting up "huser", please see the home page of t00 Wiki under the heading, "DB Setup on local machine"
v. Exit mySQL using the "\q" command
vi. Type the command "mysql -u huser -p", and enter the password hpassword when prompted
vii. Type the command "source ~/<path_to_dbo.sql>", the path to dbo.sql in the project folder is t00/src/main/resources/dbo.sql
a. For more information on the script "dbo.sql", please see the "Using the Database Script" page of t00 Wiki
viii. Type the command "USE db", then type the command "SHOW TABLES;", and ensure that there are 5 tables: Cars, Legs, PassengerTrips, Trips, and Users
ix. Exit mySQL using "\q" command
3. Ensure that you are in the root of the folder t00
To run the application and demo script
1. Open 2 terminal windows
2. In one window, from the root of the project folder, use the command "mvn spring-boot:run"
3. In the other window, from the root of the project folder, use the command "cd src/main/resources"
4. Use the command ./run-tests.bash to run the bash script (information about the functionality of run-tests.bash is under the heading "About run-tests.bash")
i. If permission is denied, use the command "chmod +x run-tests.bash" and repeat step 4
5. If you would like to run more tests, please refer to the home page of the t00 Wiki to find templates for URLs
i. A list of URLs is under the heading "Controller Method Usage", and is further subdivided by controller and method
6. After the script is done running, and you no longer wish to test the application, use "command-c" to quit the running process in the terminal window that the Maven command was run from
About run-tests.bash
run-tests.bash is written to demonstrate the functionality of the app, following the general path of how a user would use it. The script will echo what the particular command is doing or has done, and a new tab will open with the information from the method that it calls. The tabs will stay open so that any errors can be mapped back to which method threw them.