Our group, Git Good 207, decided to make a Recipe sharing app called Foodstagram.
Group Members:
- Eric
- Yolanda
- Shawn
- Sebastian
- Glen
- Justin
You need to setup a MySQL Database to get Foodstagram running. To do so, follow these steps:
- Make sure you git pull from the main branch.
- Download MAMP here https://www.mamp.info/en/downloads/. MAMP is a local server environment that will allow the database to operate on your computer.
- Install MAMP
- Open MAMP
- Click "Preferences" in the top left of the window.
- Go to the "Ports" tab.
- Click the "MAMP default" button next to "Set Web & MySQL ports to:"
- Click OK to confirm your Port options.
- Now you should be back at the MAMP window main area (where you were after step 3)
- Click the "Start" button in the top right to start your server.
- Now click the "WebStart" button in the top right. This should open a tab in your web browser.
- In the menu of this website, go to "Tools > phpMyAdmin".
- Click "New" on the left menu bar on the left side of your window. A database creation menu will open on the main area (on the right). Enter "foodstagram" as the name of your database and click create.
- You should see a toolbar at the top of the window that has "Databases, SQL, Status, User accounts, Export, Import, Settings, etc.". Click on "Import".
- Click on "Choose File" and go to your Course Project directory (wherever your local copy of our app is), and select the file "setup.sql".
- Now that "setup.sql" is loaded in, click the "Go" button in the bottom right of the webpage.
- Navigate to "User Accounts" in the top bar.
- Click on "Add new account".
- In username put "admin" and in password put "1234". Retype the password. Next to "Global Privileges", click on the words "Check all".
- Scroll down and click "Go" to create your user.
- Open the course project in IntelliJ.
- In the top menu, go to File > Project Structure. In the window that opens, go to Modules > Course_project > main. Open the dependencies tab on the right.
- Once in the dependencies view, click the + button right above the word "export". Select the first option: "1 Jars and Directories", and select the mysql-connector.jar file in the "lib" folder of our course project.
- Click apply, and when the apply button greys out, click OK.
- In the top menu, go to View > Tool Windows > Database
- In the Database window click the '+' icon, then Data Source > MySQL. A "Data Source and Drivers" window should pop up.
- Set Port to 8889, User to "admin", and Password to "1234"
- Then at the end of the URL enter "/foodstagram"
- Press "Apply" and then "OK".
- Your MySQL server is now running and the Database should work. You can confirm this by running the main method in MySQLController.
These instructions are based off of https://angular.io/guide/setup-local.
- Install Node.js here: https://nodejs.org/en/download/.
- Open a terminal window inside the foodstagram-ui folder.
- In your terminal, run "npm install -g @angular/cli"
- Run the command "ng serve --open"
- A browser window should open with the web frontend.
Note: the web frontend will be hosted at localhost:4200 and can be accessed by typing that address in your web browser (when the development server, ng serve, is running).