#CompFit
##How To Set Up Dev Environment
-
Clone the repository
-
cd into the directory of the cloned repo and run
vagrant up -
Run
vagrant --reload provision -
run
vagrant ssh -
To add the SQL file as the database, run
mysql -uroot -p compfit < compfitmockdata.sql -
run
sudo a2enmod rewrite -
edit /etc/apache2/apache2.conf so that this section:
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all grantedLooks like this:
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted -
then restart apache by running
sudo service apache2 restart
##How to Run the Server
- SSH into the vagrant box
- Run
cd /var/www/html/app - Run
gulp - In the browser, navigate to
http://localhost:8080/ - Edit files
- Ctrl-C to stop server
- Run
gulpto start again to see edits
##Building the App Building the app creates static files, so webpack-dev-server does not have to be running. You will build the server to run the API calls. As of now, you cannot make API calls without building.
- Run
cd /var/www/html/app - Run
gulp build - In the browser, navigate to
http://localhost:9000/
##Make API calls
For now, when making api calls, you want to go to /api/endpoint