Skip to content

Setting up the Server

mablack01 edited this page Dec 14, 2017 · 1 revision

Setting up Toast Tagging

In order to set up the Toast Tagging software you must first setup and load data into the database, pull the latest project, and run the frontend and backend on node.

Setting up the database

Once you pull the project from the git repository, there is a script folder that contains two .sql scripts. Assuming that MySQL Server/Workbench is already set up, open MySQL Workbench and start up your server. Navigate to the "New Query" and open the setupAndImportCSV.sql file. There is a path to the CSV in this query so you must modify it to match your local system's path. Click the "Execute Query" button indicated by a lightning bolt and the script should run without error. This script will have created the toasttagging database, set up all the tables with default values and such, as well as populate the CSV data into the systems table. The next script you want to run is importMockData.csv, run it in the similar fashion you did to the previous script and it should run without issue. This imports a lot of varied mock data that correlates with each other. This populates all the tables and provides sufficient data to test with.

Setting up the frontend and backend

First, make sure that you have pulled the latest master branch, or merged it into your own branch to prevent future conflicts with merging. Once you are up to date, open your command line depending on your operating system and navigate two windows: one to the /backend folder and the other to the /frontend folder. In both directories, you need to run the command "npm install" to install node dependencies required to run this project. Now that you have node installed, run the same command in both directories "node server.js" to get both the back end and front end online. You should now be able to access the webapp through localhost:4000/login.