This project was bootstrapped with Create React App.
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
sudo apt install nodejs
ln -s /usr/bin/nodejs /usr/bin/node
cd GarageShelves/react_shelves
npm install
<VirtualHost *:8080>
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/frontend
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/frontend">
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html to allow html5 state links
RewriteRule ^ index.html [L]
</Directory>
</VirtualHost>
In the project directory, you can run:
Runs the app in the development mode.
Open http://127.0.0.1:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Create .env.production with the following line:
REACT_APP_BACKEND_URL=http://<server address>:<server port>/
This url should point to the address of the backend server.